About |
+ | |
+ Screenshots |
| |
- MySocials API |
+ MySocials API |
| |
Privacy |
| |
@@ -78,7 +80,7 @@
Interaction with driver
- Fuction msa_module->send(xmlDocPtr request, xmlDocPtr* response, const struct msa_module* info) is used to perform requests to the driver.
+ Function msa_module->send(xmlDocPtr request, xmlDocPtr* response, const struct msa_module* info) is used to perform requests to the driver.
Parameter request is a request in XML format. Description of structure of sending and receiveing data is described here.
Parameter response contains driver response in XML format.
Function msa_module_get_info(struct msa_module* d) is used to get information about driver (driver name and icon).
@@ -103,7 +105,7 @@ Function msa_module_get_info(struct msa_module* d) is used to get informa
Driver interface
- MySocials driver interface described in msa_module structure. Some of the fields of this stucture are filled before initialization by application (marked with **), the rest of it is filled during initialization.
+ MySocials driver interface described in msa_module structure. Some of the fields of this structure are filled before initialization by application (marked with **), the rest of it is filled during initialization.
struct msa_module {
gchar *id; // Identifier
@@ -149,7 +151,7 @@ Function msa_module_get_info(struct msa_module* d) is used to get informa
noAuthorize - flag which forbids driver to call WebAuth (optional, set to false by default)
class - class which includes called function
function - name of the function
- Params - set of parameters, stricly defined for each function
+ Params - set of parameters, strictly defined for each function
Response format
@@ -161,13 +163,12 @@ Function msa_module_get_info(struct msa_module* d) is used to get informa
- - authorized - flag which indicates authorization during request performing (flag isn't set if error occures during request performing)
+ - authorized - flag which indicates authorization during request performing (flag isn't set if error occurs during request performing)
- upload - number of bytes sent to server
- download - number of bytes received from server
- Following classes are supported:
-
+ Following classes are supported:
- settings: class for working with settings
- profile: class for receiving data about user's profile
@@ -669,7 +670,266 @@ Function msa_module_get_info(struct msa_module* d) is used to get informa
<string name="url"> ... </string>
</attachment>
+
+ getListInboxMessages
+ Request:
+
<Request class="messages" function="getListInboxMessages">
+ <Params>
+ <number name="page"></number>
+ <number name="pageSize"></number>
+ <number name="timeOffset"> ... </number>
+ </Params>
+</Request>
+
+
+ - page - number of page that is requested (optional, positive integer, equals 1 by default)
+ - pageSize - page size (optional, positive integer, equals 100 by default)
+ - timeOffset - time offset for requested news (optional)
+
+ Response:
+ <Response class="messages" function = "getListInboxMessages">
+ <Params>
+ <array name="messageList" page="..." pageSize="..." quantity="...">
+ <struct name="message" id="...">
+ <string name="SenderId"> ... </string>
+ <string name="SenderName"> ... </string>
+ <string name="Time"> ... </string>
+ <string name="Title"> ... </string>
+ <string name="Text"> ... </string>
+ <string name="Status"> ... </string>
+ <attachment id="..." ownerId="..." type="...">
+ ...
+ </attachment>
+ </struct>
+ </array>
+ </Params>
+</Response>
+
+ getListThreads
+ Request:
+ <Request class="messages" function="getListThreads">
+ <Params>
+ <number name="page"></number>
+ <number name="pageSize"></number>
+ </Params>
+</Request>
+
+
+ - page - number of page that is requested (optional, positive integer, equals 1 by default)
+ - pageSize - page size (optional, positive integer, equals 100 by default)
+
+ Response:
+ <Response class="messages" function = "getListThreads">
+ <Params>
+ <array name="threadList" page="..." pageSize="..." quantity="...">
+ <struct name="thread" id="...">
+ <number name="time"> ... </number>
+ <number name="size"> ... </number>
+ </struct>
+ </array>
+ </Params>
+</Response>
+
+
+ getListThreadMessages
+ Request:
+ <Request class="messages" function="getListThreadMessages">
+ <Params>
+ <string name="threadId"></string>
+ <number name="page"></number>
+ <number name="pageSize"></number>
+ </Params>
+</Request>
+
+
+ - page - number of page that is requested (optional, positive integer, equals 1 by default)
+ - pageSize - page size (optional, positive integer, equals 100 by default)
+
+ Response:
+ <Response class="messages" function = "getListThreadMessages">
+ <Params>
+ <array name="messageList" threadId="..." page="..." pageSize="..." quantity="...">
+ <struct name="message" id="...">
+ <string name="SenderId"> ... </string>
+ <string name="SenderName"> ... </string>
+ <array name="recipientList" quantity="...">
+ <struct name="recipient">
+ <string name="RecipientId"> ... </string>
+ <string name="RecipientName"> ... </string>
+ </struct>
+ </array>
+ <string name="Time"> ... </string>
+ <string name="Title"> ... </string>
+ <string name="Text"> ... </string>
+ <string name="Status"> ... </string>
+ <attachment id="..." ownerId="..." type="...">
+ ...
+ </attachment>
+ </struct>
+ </array>
+ </Params>
+</Response>
+
+
+ - time - time of the last message in thread
+ - senderId and senderName - available only for inbox messages
+ - recipientList - available only for outbox messages
+
+
+ getTotalCountInbox
+ Request:
+ <Request class="messages" function = "getTotalCountInbox">
+ <Params/>
+</Request>
+
+ Response:
+ <Response class="messages" function = "getTotalCountInbox">
+ <Params>
+ <string name="quantity"> ... </string>
+ </Params>
+</Response>
+
+
+ getTotalCountOutbox
+ Request:
+ <Request class="messages" function = "getTotalCountOutbox">
+ <Params/>
+</Request>
+
+ Response:
+ <Response class="messages" function = "getTotalCountOutbox">
+ <Params>
+ <string name="quantity"> ... </string>
+ </Params>
+</Response>
+
+
+ getCountInboxByTime
+ Request:
+ <Request class="messages" function = "getCountInboxByTime">
+ <Params>
+ <number name="timeOffset"> ... </number>
+ </Params>
+</Request>
+
+ Response:
+ <Response class="messages" function = "getCountInboxByTime">
+ <Params>
+ <string name="quantity"> ... </string>
+ </Params>
+</Response>
+
+
+ getCountOutboxByTime
+ Request:
+ <Request class="messages" function = "getCountOutboxByTime">
+ <Params>
+ <number name="timeOffset"> ... </number>
+ </Params>
+</Request>
+
+ Response:
+ <Response class="messages" function = "getCountOutboxByTime">
+ <Params>
+ <string name="quantity"> ... </string>
+ </Params>
+</Response>
+
+
+ sendMessage
+ Request:
+ <Request class="messages" function = "sendMessage">
+ <Params id="...">
+ <string name="text"> ... </string>
+ <string name="title"> ... </string>
+ </Params>
+</Request>
+
+ Response: info message or error message.
+
+ readMessage
+ Request:
+ <Request class="messages" function="readMessage">
+ <Params>
+ <string name="messageId"> ... </string>
+ </Params>
+</Request>
+
+ Response: info message or error message.
+
+ deleteMessage
+ Request:
+ <Request class="messages" function="deleteMessage">
+ <Params>
+ <string name="messageId"> ... </string>
+ </Params>
+</Request>
+
+ Response: info message or error message.
+
+ getListWallMessages
+ Request:
+ <Request class="messages" function="getListWallMessages">
+ <Params id="...">
+ <number name="page"></number>
+ <number name="pageSize"></number>
+ </Params>
+</Request>
+
+ Response:
+ <Response class="messages" function = "getListWallMessages">
+ <Params id="...">
+ <array name="messageList" page="..." pageSize="..." quantity="...">
+ <struct name="message" id="...">
+ <string name="SenderId">... </string>
+ <string name="SenderName"> ... </string>
+ <string name="Time"> ... </string>
+ <string name="Text"> ... </string>
+ <attachment id="..." ownerId="..." type="...">
+ ...
+ </attachment>
+ </struct>
+ </array>
+ </Params>
+</Response>
+
+ Content of the attachment tag is the same as in class Messages.
+
+ getTotalCountWall
+ Request:
+ <Request class="messages" function = "getTotalCountWall">
+ <Params id="...">
+ </Params>
+</Request>
+
+ Response:
+ <Response class="messages" function = "getTotalCountWall">
+ <Params>
+ <string name="quantity">123</string>
+ </Params>
+</Response>
+
+
+ sendWallMessages
+ Request:
+ <Request class="messages" function = "sendWallMessage">
+ <Params id="...">
+ <string name="text">text of message</string>
+ </Params>
+</Request>
+
+ Response: info message or error message.
+
+ deleteWallMessages
+ Request:
+ <Request class="messages" function="deleteWallMessage">
+ <Params>
+ <string name="messageId">...</string>
+ </Params>
+</Request>
+
+ Response: info message or error message.
@@ -695,6 +955,27 @@ Function msa_module_get_info(struct msa_module* d) is used to get informa
</Params>
</Response>
+
+ getAudio
+ Request:
+ <Request class="audio" function="getAudio">
+ <Params id="vk...">
+ <string name="audioId">...</string>
+ </Params>
+</Request>
+
+ Response:
+ <Response class="audio" function = "getAudio">
+ <Params>
+ <struct name="audio" id="vk..." ownerId="vk...">
+ <string name="title">...</string>
+ <string name="artist">...</string>
+ <number name="duration">...</number>
+ <string name="audio">...url...</string>
+ </struct>
+ </Params>
+</Response>
+
@@ -726,6 +1007,51 @@ Function msa_module_get_info(struct msa_module* d) is used to get informa
News
+ getListNews
+ Request:
+ <Request class="news" function="getListNews">
+ <Params>
+ <number name="page"> ... </number>
+ <number name="pageSize"> ... </number>
+ <number name="timeOffset"> ... </number>
+ <string name="newsType">TYPE</string>
+ </Params>
+</Request>
+
+
+ - page - number of page that is requested (optional, positive integer, equals 1 by default)
+ - pageSize - page size (optional, positive integer, equals 100 by default)
+ - timeOffset - time offset for requested news (optional)
+
+ TYPE can have following values:
+
+ - photo: new friends' photos
+ - message: new wall messages
+ - comment: new comments to user's photos and comments to friends' photos that were commented by the user
+ - audio: new friends' audio
+ - video: new friends' video
+ - like: new "Like" marks
+ - tag: new mark on photos
+ - friend: new friends' friends
+
+ Response:
+ <Response class="news" function="getListNews">
+ <Params>
+ <array name="newsList" page="..." pageSize="..." quantity="..." newsType="TYPE">
+ <struct name="news">
+ <string name="authorId"> ... </string>
+ <string name="authorName"> ... </string>
+ <string name="text"> ... </string>
+ <number name="created"> ... </number>
+ <attachment id="..." ownerId="..." type="image/video/audio/link/note">
+ </attachment>
+ </struct>
+ </array>
+ </Params>
+</Response>
+
+ authorName - news author name (optional).
+ Content of the attachment tag is the same as in class Messages.