如何为调用创建get方法

时间:2015-06-16 11:11:42

标签: php arrays json http quickblox

我正在研究和实施一个api,并在遵循这些例子的同时,

以下是示例1:

Drawing with keys

 RET        Does one of the following:
        For lines/rectangles/squares: sets the first/second endpoint
        For poly-lines: sets a point (use C-u RET to set last point)
        When erase characters: toggles erasing
        When cutting/copying: Sets first/last endpoint of rect/square
        When pasting: Pastes

 C-c C-a C-o    Selects what to draw

 Move around with C-n, C-p, C-f and C-b.

 C-c C-a C-f    Sets the character to use when filling
 C-c C-a C-l    Sets the character to use when drawing
 C-c C-a C-e    Sets the character to use when erasing
 C-c C-a C-r    Toggles rubber-banding
 C-c C-a C-t    Toggles trimming of line-endings
 C-c C-a C-s    Toggles borders on drawn shapes


Arrows

 <      Sets/unsets an arrow at the beginning
        of the line/poly-line

 >      Sets/unsets an arrow at the end
        of the line/poly-line

对于上面的示例,我将我的get方法构建为

curl -X POST \
-H "Content-Type: application/json" \
-H "QuickBlox-REST-API-Version: 0.1.0" \
-d '{"application_id": "2", "auth_key": "DtF9cZPqTF8Wy9Q", "timestamp": "1333630580", "nonce": "1340569516", "signature": "13293a5bd2026b957ebbb36c89d9649aae9e5503", "user": {"login": "injoit", "password": "injoit"}}' \
https://api.quickblox.com/session.json

它运作良好。

但是对于下面的例子

https://api.quickblox.com/session.json?token=re8d22c6e617133ffeadd761193a6c57d87bfb1a0f&application_id=23995&auth_key=CbRasu4Wftu25Qw&nonce=8796&timestamp=1434446627&signature=667ee2b448a5d3dd57d112afef3f84dd6c67e165

如何创建get方法。由于这有两个主阵列,我很困惑。

任何人都可以帮忙创建我如何使用此电话?

1 个答案:

答案 0 :(得分:1)

它应该是这样的:

https://api.quickblox.com/push_tokens.json?push_token[environment]=production&push_token[client_identification_sequence]=aa557232bc237245ba67686484efab&device[platform]=iOS&device[udid]=5f5930e927660e6e7d8ff0548b3c404a4d16c04f