{"action":"created","comment":{"url":"https://api.github.com/repos/xing/xing-android-sdk/pulls/comments/56506172","id":56506172,"diff_hunk":"@@ -0,0 +1,134 @@\n+/*\n+ * Copyright (С) 2015 XING AG (http://xing.com/)\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *    http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package com.xing.api.resources;\n+\n+import com.xing.api.CallSpec;\n+import com.xing.api.HttpError;\n+import com.xing.api.Resource;\n+import com.xing.api.XingApi;\n+import com.xing.api.data.messages.Conversation;\n+import com.xing.api.data.messages.ConversationMessage;\n+\n+import java.util.List;\n+\n+/**\n+ * Represent the <a href=\"https://dev.xing.com/docs/resources#messages\">'Messages'</a> resource.\n+ * <p>\n+ * Provides methods which allow access to user's {@linkplain Conversation conversations}.\n+ */\n+public final class MessagesResource extends Resource {\n+    /** Creates a resource instance. This should be the only constructor declared by child classes. */\n+    MessagesResource(XingApi api) {\n+        super(api);\n+    }\n+\n+    /**\n+     * Gets a list of {@linkplain com.xing.api.data.profile.XingUser user's} {@linkplain Conversation conversations}.\n+     * The data returned by this call will be checked and filtered on the basis of the privacy settings of each\n+     * requested user.\n+     * <p>\n+     * Possible optional <i>query</i> parameters:\n+     * <table>\n+     * <tr>\n+     * <th>Parameter Name</th>\n+     * <th><b>Description</b></th>\n+     * </tr>\n+     * <tr>\n+     * <td><b>limit</b></td>\n+     * <td>Restrict the number of attachments to be returned. Must be a positive number. Default: 10</td>\n+     * </tr>\n+     * <tr>\n+     * <td><b>offset</b></td>\n+     * <td>Offset. Must be a positive number. Default: 0</td>\n+     * </tr>\n+     * <tr>\n+     * <td><b>strip_html</b></td>\n+     * <td>Specifies whether the message content should be stripped of HTML (true) or not (false). The default value is\n+     * false.</td>\n+     * </tr>\n+     * <tr>\n+     * <td><b>user_fields</b></td>\n+     * <td>List of user attributes to return. If this parameter is not used, only the ID will be returned.</td>\n+     * </tr>\n+     * <tr>\n+     * <td><b>with_latest_messages</b></td>\n+     * <td>Number of latest messages to include. Must be non-negative. Default: 0, Maximum: 100</td>\n+     * </tr>\n+     * </table>\n+     *\n+     * @param userId Id of the {@linkplain com.xing.api.data.profile.XingUser user} to request its\n+     * {@linkplain Conversation conversations}.\n+     * @return A {@linkplain CallSpec callSpec object} ready to execute the request.\n+     *\n+     * @see <a href=\"https://dev.xing.com/docs/get/users/:user_id/conversations\">'List user conversations' resource\n+     * page</a>\n+     */\n+    public CallSpec<List<Conversation>, HttpError> getConversationsByUserId(String userId) {\n+        return Resource.<List<Conversation>, HttpError>newGetSpec(api, \"/v1/users/{id}/conversations\")\n+              .pathParam(\"id\", userId)\n+              .responseAs(list(Conversation.class, \"conversations\", \"items\"))\n+              .build();\n+    }\n+\n+    /**\n+     * Starts a {@linkplain Conversation conversation} by sending the passed message to the recipients.\n+     * The subject of a conversation cannot be changed afterwards.\n+     * Basic members are not allowed to send messages to non-contacts.\n+     * Premium members are limited to 20 messages to non-contacts per month.\n+     *\n+     * @param content Message text with max size of 16384 UTF-8 characters\n+     * @param recipientIds Comma-separated list of recipients. There must be between one and 10 recipients.\n+     * Sender cannot be included.\n+     * @param subject Subject for conversation. Max. size is 255 UTF-8 characters\n+     * @param userId Id of the {@linkplain com.xing.api.data.profile.XingUser user} starting the conversation\n+     * @return A {@linkplain CallSpec callSpec object} ready to execute the request.\n+     *\n+     * @see <a href=\"https://dev.xing.com/docs/post/users/:user_id/conversations\">'Create a conversation' resource page</a>\n+     */\n+    public CallSpec<Conversation, HttpError> createConversation(String content, String recipientIds, String subject,","path":"api-client/src/main/java/com/xing/api/resources/MessagesResource.java","position":101,"original_position":101,"commit_id":"c6de5347860702b6ca4a9d5ac554441f7b2b1dcf","original_commit_id":"c6de5347860702b6ca4a9d5ac554441f7b2b1dcf","user":{"login":"serj-lotutovici","id":1552206,"avatar_url":"https://avatars.githubusercontent.com/u/1552206?v=3","gravatar_id":"","url":"https://api.github.com/users/serj-lotutovici","html_url":"https://github.com/serj-lotutovici","followers_url":"https://api.github.com/users/serj-lotutovici/followers","following_url":"https://api.github.com/users/serj-lotutovici/following{/other_user}","gists_url":"https://api.github.com/users/serj-lotutovici/gists{/gist_id}","starred_url":"https://api.github.com/users/serj-lotutovici/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/serj-lotutovici/subscriptions","organizations_url":"https://api.github.com/users/serj-lotutovici/orgs","repos_url":"https://api.github.com/users/serj-lotutovici/repos","events_url":"https://api.github.com/users/serj-lotutovici/events{/privacy}","received_events_url":"https://api.github.com/users/serj-lotutovici/received_events","type":"User","site_admin":false},"body":"Ok, checked the docks, and it seams that a request with url `/v1/users/me/conversations` is not supported... just change the signature..","created_at":"2016-03-17T13:51:32Z","updated_at":"2016-03-17T13:51:32Z","html_url":"https://github.com/xing/xing-android-sdk/pull/110#discussion_r56506172","pull_request_url":"https://api.github.com/repos/xing/xing-android-sdk/pulls/110","_links":{"self":{"href":"https://api.github.com/repos/xing/xing-android-sdk/pulls/comments/56506172"},"html":{"href":"https://github.com/xing/xing-android-sdk/pull/110#discussion_r56506172"},"pull_request":{"href":"https://api.github.com/repos/xing/xing-android-sdk/pulls/110"}}},"pull_request":{"url":"https://api.github.com/repos/xing/xing-android-sdk/pulls/110","id":63196292,"html_url":"https://github.com/xing/xing-android-sdk/pull/110","diff_url":"https://github.com/xing/xing-android-sdk/pull/110.diff","patch_url":"https://github.com/xing/xing-android-sdk/pull/110.patch","issue_url":"https://api.github.com/repos/xing/xing-android-sdk/issues/110","number":110,"state":"open","locked":false,"title":"Implemented MessagesResource","user":{"login":"ricamgar","id":927648,"avatar_url":"https://avatars.githubusercontent.com/u/927648?v=3","gravatar_id":"","url":"https://api.github.com/users/ricamgar","html_url":"https://github.com/ricamgar","followers_url":"https://api.github.com/users/ricamgar/followers","following_url":"https://api.github.com/users/ricamgar/following{/other_user}","gists_url":"https://api.github.com/users/ricamgar/gists{/gist_id}","starred_url":"https://api.github.com/users/ricamgar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ricamgar/subscriptions","organizations_url":"https://api.github.com/users/ricamgar/orgs","repos_url":"https://api.github.com/users/ricamgar/repos","events_url":"https://api.github.com/users/ricamgar/events{/privacy}","received_events_url":"https://api.github.com/users/ricamgar/received_events","type":"User","site_admin":false},"body":"Implemented the following methods of MessagesResource:\r\n- getConversationByUserId()\r\n- createConversation()\r\n- sendMessageToConversation()\r\n\r\nAdded gradle task to install library locally (for testing purposes)\r\n\r\nTo review:\r\n- [ ] @serj-lotutovici / @dhartwich1991 ","created_at":"2016-03-17T09:49:47Z","updated_at":"2016-03-17T13:51:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"40cf4bb0873ef4d13f5a1cf053032368c21552c5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/xing/xing-android-sdk/pulls/110/commits","review_comments_url":"https://api.github.com/repos/xing/xing-android-sdk/pulls/110/comments","review_comment_url":"https://api.github.com/repos/xing/xing-android-sdk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/xing/xing-android-sdk/issues/110/comments","statuses_url":"https://api.github.com/repos/xing/xing-android-sdk/statuses/c6de5347860702b6ca4a9d5ac554441f7b2b1dcf","head":{"label":"ricamgar:feature/messages_resource","ref":"feature/messages_resource","sha":"c6de5347860702b6ca4a9d5ac554441f7b2b1dcf","user":{"login":"ricamgar","id":927648,"avatar_url":"https://avatars.githubusercontent.com/u/927648?v=3","gravatar_id":"","url":"https://api.github.com/users/ricamgar","html_url":"https://github.com/ricamgar","followers_url":"https://api.github.com/users/ricamgar/followers","following_url":"https://api.github.com/users/ricamgar/following{/other_user}","gists_url":"https://api.github.com/users/ricamgar/gists{/gist_id}","starred_url":"https://api.github.com/users/ricamgar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ricamgar/subscriptions","organizations_url":"https://api.github.com/users/ricamgar/orgs","repos_url":"https://api.github.com/users/ricamgar/repos","events_url":"https://api.github.com/users/ricamgar/events{/privacy}","received_events_url":"https://api.github.com/users/ricamgar/received_events","type":"User","site_admin":false},"repo":{"id":50990769,"name":"xing-android-sdk","full_name":"ricamgar/xing-android-sdk","owner":{"login":"ricamgar","id":927648,"avatar_url":"https://avatars.githubusercontent.com/u/927648?v=3","gravatar_id":"","url":"https://api.github.com/users/ricamgar","html_url":"https://github.com/ricamgar","followers_url":"https://api.github.com/users/ricamgar/followers","following_url":"https://api.github.com/users/ricamgar/following{/other_user}","gists_url":"https://api.github.com/users/ricamgar/gists{/gist_id}","starred_url":"https://api.github.com/users/ricamgar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ricamgar/subscriptions","organizations_url":"https://api.github.com/users/ricamgar/orgs","repos_url":"https://api.github.com/users/ricamgar/repos","events_url":"https://api.github.com/users/ricamgar/events{/privacy}","received_events_url":"https://api.github.com/users/ricamgar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ricamgar/xing-android-sdk","description":"The Official XING API client for Java/Android","fork":true,"url":"https://api.github.com/repos/ricamgar/xing-android-sdk","forks_url":"https://api.github.com/repos/ricamgar/xing-android-sdk/forks","keys_url":"https://api.github.com/repos/ricamgar/xing-android-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ricamgar/xing-android-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ricamgar/xing-android-sdk/teams","hooks_url":"https://api.github.com/repos/ricamgar/xing-android-sdk/hooks","issue_events_url":"https://api.github.com/repos/ricamgar/xing-android-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/ricamgar/xing-android-sdk/events","assignees_url":"https://api.github.com/repos/ricamgar/xing-android-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/ricamgar/xing-android-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/ricamgar/xing-android-sdk/tags","blobs_url":"https://api.github.com/repos/ricamgar/xing-android-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ricamgar/xing-android-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ricamgar/xing-android-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/ricamgar/xing-android-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ricamgar/xing-android-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/ricamgar/xing-android-sdk/languages","stargazers_url":"https://api.github.com/repos/ricamgar/xing-android-sdk/stargazers","contributors_url":"https://api.github.com/repos/ricamgar/xing-android-sdk/contributors","subscribers_url":"https://api.github.com/repos/ricamgar/xing-android-sdk/subscribers","subscription_url":"https://api.github.com/repos/ricamgar/xing-android-sdk/subscription","commits_url":"https://api.github.com/repos/ricamgar/xing-android-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/ricamgar/xing-android-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/ricamgar/xing-android-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/ricamgar/xing-android-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/ricamgar/xing-android-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/ricamgar/xing-android-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ricamgar/xing-android-sdk/merges","archive_url":"https://api.github.com/repos/ricamgar/xing-android-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ricamgar/xing-android-sdk/downloads","issues_url":"https://api.github.com/repos/ricamgar/xing-android-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/ricamgar/xing-android-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/ricamgar/xing-android-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/ricamgar/xing-android-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ricamgar/xing-android-sdk/labels{/name}","releases_url":"https://api.github.com/repos/ricamgar/xing-android-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/ricamgar/xing-android-sdk/deployments","created_at":"2016-02-03T10:00:15Z","updated_at":"2016-02-03T10:00:16Z","pushed_at":"2016-03-17T11:00:14Z","git_url":"git://github.com/ricamgar/xing-android-sdk.git","ssh_url":"git@github.com:ricamgar/xing-android-sdk.git","clone_url":"https://github.com/ricamgar/xing-android-sdk.git","svn_url":"https://github.com/ricamgar/xing-android-sdk","homepage":"","size":1030,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"xing:master","ref":"master","sha":"74314caa99f03e2e4b8bc171405191cf94d39f01","user":{"login":"xing","id":27901,"avatar_url":"https://avatars.githubusercontent.com/u/27901?v=3","gravatar_id":"","url":"https://api.github.com/users/xing","html_url":"https://github.com/xing","followers_url":"https://api.github.com/users/xing/followers","following_url":"https://api.github.com/users/xing/following{/other_user}","gists_url":"https://api.github.com/users/xing/gists{/gist_id}","starred_url":"https://api.github.com/users/xing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xing/subscriptions","organizations_url":"https://api.github.com/users/xing/orgs","repos_url":"https://api.github.com/users/xing/repos","events_url":"https://api.github.com/users/xing/events{/privacy}","received_events_url":"https://api.github.com/users/xing/received_events","type":"Organization","site_admin":false},"repo":{"id":39831872,"name":"xing-android-sdk","full_name":"xing/xing-android-sdk","owner":{"login":"xing","id":27901,"avatar_url":"https://avatars.githubusercontent.com/u/27901?v=3","gravatar_id":"","url":"https://api.github.com/users/xing","html_url":"https://github.com/xing","followers_url":"https://api.github.com/users/xing/followers","following_url":"https://api.github.com/users/xing/following{/other_user}","gists_url":"https://api.github.com/users/xing/gists{/gist_id}","starred_url":"https://api.github.com/users/xing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xing/subscriptions","organizations_url":"https://api.github.com/users/xing/orgs","repos_url":"https://api.github.com/users/xing/repos","events_url":"https://api.github.com/users/xing/events{/privacy}","received_events_url":"https://api.github.com/users/xing/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/xing/xing-android-sdk","description":"The Official XING API client for Java/Android","fork":false,"url":"https://api.github.com/repos/xing/xing-android-sdk","forks_url":"https://api.github.com/repos/xing/xing-android-sdk/forks","keys_url":"https://api.github.com/repos/xing/xing-android-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xing/xing-android-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xing/xing-android-sdk/teams","hooks_url":"https://api.github.com/repos/xing/xing-android-sdk/hooks","issue_events_url":"https://api.github.com/repos/xing/xing-android-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/xing/xing-android-sdk/events","assignees_url":"https://api.github.com/repos/xing/xing-android-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/xing/xing-android-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/xing/xing-android-sdk/tags","blobs_url":"https://api.github.com/repos/xing/xing-android-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xing/xing-android-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xing/xing-android-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/xing/xing-android-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xing/xing-android-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/xing/xing-android-sdk/languages","stargazers_url":"https://api.github.com/repos/xing/xing-android-sdk/stargazers","contributors_url":"https://api.github.com/repos/xing/xing-android-sdk/contributors","subscribers_url":"https://api.github.com/repos/xing/xing-android-sdk/subscribers","subscription_url":"https://api.github.com/repos/xing/xing-android-sdk/subscription","commits_url":"https://api.github.com/repos/xing/xing-android-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/xing/xing-android-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/xing/xing-android-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/xing/xing-android-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/xing/xing-android-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/xing/xing-android-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xing/xing-android-sdk/merges","archive_url":"https://api.github.com/repos/xing/xing-android-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xing/xing-android-sdk/downloads","issues_url":"https://api.github.com/repos/xing/xing-android-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/xing/xing-android-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/xing/xing-android-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/xing/xing-android-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xing/xing-android-sdk/labels{/name}","releases_url":"https://api.github.com/repos/xing/xing-android-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/xing/xing-android-sdk/deployments","created_at":"2015-07-28T12:11:53Z","updated_at":"2016-02-09T14:42:44Z","pushed_at":"2016-03-17T11:00:15Z","git_url":"git://github.com/xing/xing-android-sdk.git","ssh_url":"git@github.com:xing/xing-android-sdk.git","clone_url":"https://github.com/xing/xing-android-sdk.git","svn_url":"https://github.com/xing/xing-android-sdk","homepage":"","size":1039,"stargazers_count":18,"watchers_count":18,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":13,"forks":6,"open_issues":13,"watchers":18,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/xing/xing-android-sdk/pulls/110"},"html":{"href":"https://github.com/xing/xing-android-sdk/pull/110"},"issue":{"href":"https://api.github.com/repos/xing/xing-android-sdk/issues/110"},"comments":{"href":"https://api.github.com/repos/xing/xing-android-sdk/issues/110/comments"},"review_comments":{"href":"https://api.github.com/repos/xing/xing-android-sdk/pulls/110/comments"},"review_comment":{"href":"https://api.github.com/repos/xing/xing-android-sdk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/xing/xing-android-sdk/pulls/110/commits"},"statuses":{"href":"https://api.github.com/repos/xing/xing-android-sdk/statuses/c6de5347860702b6ca4a9d5ac554441f7b2b1dcf"}}}}