member, response, api, request, response, send, soap, rest, get, post, put, delete

Method GetMemberResponse

API

Returns property of object by path

Watch this video to learn how to use this method

Have a problem with playback?
GetMemberResponse Method returns object property by path. GetMemberResponse contains one parameter: path to the object property. Lets take an example: We have a method which returns Book object by ID. Below you can see this method response. Let's try to get Book Title from the response. Before use this function you have to call Execute Method. We will use messagebox to demonstrate the output. Here is more complicated example: This method returns a array of books. Let's try to get Title property from the second book object. To get more information about path usage please refer separate how to video of path usage for getting API method response. Now we will change Data Format property from JSON to XML. For simple objects we have the same path to the property. But in case we get array of books, we have a root object and we should include it to the path parameter.

Usage

Function GetMemberResponse(
    String Path
)

Method

GetMem...ponse

Title

Path

Parameters

Path

Type: String

Path to the object: User[5].Information.Awards

Returns

Object property value

Example

VBScript

Server("API Server").Method("GetBookById").Execute
' Execute method should be called before get member response
title = Server("API Server").Method("GetBookById").GetMemberResponse("Title")

' Try to get value from array response
Server("API Server").Method("GetBooks").Execute
title = Server("API Server").Method("GetBooks").GetMemberResponse("[1].Title")

JavaScript

Server("API Server").Method("GetBookById").Execute();
// Execute method should be called before get member response
var title = Server("API Server").Method("GetBookById").GetMemberResponse("Title");

// Try to get value from array response
Server("API Server").Method("GetBooks").Execute();
title = Server("API Server").Method("GetBooks").GetMemberResponse("[1].Title");

Method

Execute

Variable

title

GetMem...ponse

Title

Method

Zap.Comm...Box

Zap.Var...("title")

Contact Us

Tower Place 100

3340 Peachtree Rd NE #1800 

Atlanta, GA 30326 USA

(404) 814-5227