{"action":"created","comment":{"url":"https://api.github.com/repos/leancloud/docs/pulls/comments/32530754","id":32530754,"diff_hunk":"@@ -854,7 +854,16 @@ NSArray* userIds = @[@\"Chad\"];\n \n ### 获取历史消息 ###\n \n-LeanCloud 实时通信服务会将普通的对话消息自动保存在云端，之后开发者可以通过 AVIMConversation 来获取该对话的所有历史消息。获取历史消息的 API 如下：\n+LeanCloud 实时通信服务会将普通的对话消息自动保存在云端，之后开发者可以通过 AVIMConversation 来获取该对话的所有历史消息。获取历史消息的 API 有两个：\n+\n+第一个 API 用于获取该会话中最近的 limit 条历史消息，通常在第一次进入会话时调用。\n+\n+```\n+- (void)queryMessagesWithLimit:(NSUInteger)limit\n+                      callback:(AVIMArrayResultBlock)callback;\n+```\n+\n+第二个 API 用于获取某条消息之前的历史消息，通常在上拉加载更多时会用到。","path":"md/ios_realtime_v2.md","position":14,"original_position":14,"commit_id":"04b0c1b5cfbb65c70f3142456f72a03fc6844768","original_commit_id":"04b0c1b5cfbb65c70f3142456f72a03fc6844768","user":{"login":"myleslee","id":108758,"avatar_url":"https://avatars.githubusercontent.com/u/108758?v=3","gravatar_id":"","url":"https://api.github.com/users/myleslee","html_url":"https://github.com/myleslee","followers_url":"https://api.github.com/users/myleslee/followers","following_url":"https://api.github.com/users/myleslee/following{/other_user}","gists_url":"https://api.github.com/users/myleslee/gists{/gist_id}","starred_url":"https://api.github.com/users/myleslee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/myleslee/subscriptions","organizations_url":"https://api.github.com/users/myleslee/orgs","repos_url":"https://api.github.com/users/myleslee/repos","events_url":"https://api.github.com/users/myleslee/events{/privacy}","received_events_url":"https://api.github.com/users/myleslee/received_events","type":"User","site_admin":false},"body":"是不是「下拉」才加载以前的历史消息？","created_at":"2015-06-16T15:09:19Z","updated_at":"2015-06-16T15:09:19Z","html_url":"https://github.com/leancloud/docs/pull/347#discussion_r32530754","pull_request_url":"https://api.github.com/repos/leancloud/docs/pulls/347","_links":{"self":{"href":"https://api.github.com/repos/leancloud/docs/pulls/comments/32530754"},"html":{"href":"https://github.com/leancloud/docs/pull/347#discussion_r32530754"},"pull_request":{"href":"https://api.github.com/repos/leancloud/docs/pulls/347"}}},"pull_request":{"url":"https://api.github.com/repos/leancloud/docs/pulls/347","id":37778156,"html_url":"https://github.com/leancloud/docs/pull/347","diff_url":"https://github.com/leancloud/docs/pull/347.diff","patch_url":"https://github.com/leancloud/docs/pull/347.patch","issue_url":"https://api.github.com/repos/leancloud/docs/issues/347","number":347,"state":"open","locked":false,"title":"Fix document of messages query api","user":{"login":"tang3w","id":2226563,"avatar_url":"https://avatars.githubusercontent.com/u/2226563?v=3","gravatar_id":"","url":"https://api.github.com/users/tang3w","html_url":"https://github.com/tang3w","followers_url":"https://api.github.com/users/tang3w/followers","following_url":"https://api.github.com/users/tang3w/following{/other_user}","gists_url":"https://api.github.com/users/tang3w/gists{/gist_id}","starred_url":"https://api.github.com/users/tang3w/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tang3w/subscriptions","organizations_url":"https://api.github.com/users/tang3w/orgs","repos_url":"https://api.github.com/users/tang3w/repos","events_url":"https://api.github.com/users/tang3w/events{/privacy}","received_events_url":"https://api.github.com/users/tang3w/received_events","type":"User","site_admin":false},"body":"更新查询历史消息的文档。","created_at":"2015-06-16T10:02:04Z","updated_at":"2015-06-16T15:09:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b1b8a72ea6c8da597671a490fd9df9afe75d34f8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/leancloud/docs/pulls/347/commits","review_comments_url":"https://api.github.com/repos/leancloud/docs/pulls/347/comments","review_comment_url":"https://api.github.com/repos/leancloud/docs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/leancloud/docs/issues/347/comments","statuses_url":"https://api.github.com/repos/leancloud/docs/statuses/04b0c1b5cfbb65c70f3142456f72a03fc6844768","head":{"label":"tang3w:revise/query_messages_api_document","ref":"revise/query_messages_api_document","sha":"04b0c1b5cfbb65c70f3142456f72a03fc6844768","user":{"login":"tang3w","id":2226563,"avatar_url":"https://avatars.githubusercontent.com/u/2226563?v=3","gravatar_id":"","url":"https://api.github.com/users/tang3w","html_url":"https://github.com/tang3w","followers_url":"https://api.github.com/users/tang3w/followers","following_url":"https://api.github.com/users/tang3w/following{/other_user}","gists_url":"https://api.github.com/users/tang3w/gists{/gist_id}","starred_url":"https://api.github.com/users/tang3w/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tang3w/subscriptions","organizations_url":"https://api.github.com/users/tang3w/orgs","repos_url":"https://api.github.com/users/tang3w/repos","events_url":"https://api.github.com/users/tang3w/events{/privacy}","received_events_url":"https://api.github.com/users/tang3w/received_events","type":"User","site_admin":false},"repo":{"id":33900038,"name":"docs","full_name":"tang3w/docs","owner":{"login":"tang3w","id":2226563,"avatar_url":"https://avatars.githubusercontent.com/u/2226563?v=3","gravatar_id":"","url":"https://api.github.com/users/tang3w","html_url":"https://github.com/tang3w","followers_url":"https://api.github.com/users/tang3w/followers","following_url":"https://api.github.com/users/tang3w/following{/other_user}","gists_url":"https://api.github.com/users/tang3w/gists{/gist_id}","starred_url":"https://api.github.com/users/tang3w/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tang3w/subscriptions","organizations_url":"https://api.github.com/users/tang3w/orgs","repos_url":"https://api.github.com/users/tang3w/repos","events_url":"https://api.github.com/users/tang3w/events{/privacy}","received_events_url":"https://api.github.com/users/tang3w/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tang3w/docs","description":"LeanCloud Documentation","fork":true,"url":"https://api.github.com/repos/tang3w/docs","forks_url":"https://api.github.com/repos/tang3w/docs/forks","keys_url":"https://api.github.com/repos/tang3w/docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tang3w/docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tang3w/docs/teams","hooks_url":"https://api.github.com/repos/tang3w/docs/hooks","issue_events_url":"https://api.github.com/repos/tang3w/docs/issues/events{/number}","events_url":"https://api.github.com/repos/tang3w/docs/events","assignees_url":"https://api.github.com/repos/tang3w/docs/assignees{/user}","branches_url":"https://api.github.com/repos/tang3w/docs/branches{/branch}","tags_url":"https://api.github.com/repos/tang3w/docs/tags","blobs_url":"https://api.github.com/repos/tang3w/docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tang3w/docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tang3w/docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/tang3w/docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tang3w/docs/statuses/{sha}","languages_url":"https://api.github.com/repos/tang3w/docs/languages","stargazers_url":"https://api.github.com/repos/tang3w/docs/stargazers","contributors_url":"https://api.github.com/repos/tang3w/docs/contributors","subscribers_url":"https://api.github.com/repos/tang3w/docs/subscribers","subscription_url":"https://api.github.com/repos/tang3w/docs/subscription","commits_url":"https://api.github.com/repos/tang3w/docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/tang3w/docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/tang3w/docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/tang3w/docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/tang3w/docs/contents/{+path}","compare_url":"https://api.github.com/repos/tang3w/docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tang3w/docs/merges","archive_url":"https://api.github.com/repos/tang3w/docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tang3w/docs/downloads","issues_url":"https://api.github.com/repos/tang3w/docs/issues{/number}","pulls_url":"https://api.github.com/repos/tang3w/docs/pulls{/number}","milestones_url":"https://api.github.com/repos/tang3w/docs/milestones{/number}","notifications_url":"https://api.github.com/repos/tang3w/docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tang3w/docs/labels{/name}","releases_url":"https://api.github.com/repos/tang3w/docs/releases{/id}","created_at":"2015-04-13T23:41:37Z","updated_at":"2015-05-05T08:04:46Z","pushed_at":"2015-06-16T10:01:11Z","git_url":"git://github.com/tang3w/docs.git","ssh_url":"git@github.com:tang3w/docs.git","clone_url":"https://github.com/tang3w/docs.git","svn_url":"https://github.com/tang3w/docs","homepage":"http://leancloud.cn/docs/","size":19603,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"leancloud:master","ref":"master","sha":"f4125d3d3b5def1c4814a958167433fc4ffc0041","user":{"login":"leancloud","id":6660518,"avatar_url":"https://avatars.githubusercontent.com/u/6660518?v=3","gravatar_id":"","url":"https://api.github.com/users/leancloud","html_url":"https://github.com/leancloud","followers_url":"https://api.github.com/users/leancloud/followers","following_url":"https://api.github.com/users/leancloud/following{/other_user}","gists_url":"https://api.github.com/users/leancloud/gists{/gist_id}","starred_url":"https://api.github.com/users/leancloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leancloud/subscriptions","organizations_url":"https://api.github.com/users/leancloud/orgs","repos_url":"https://api.github.com/users/leancloud/repos","events_url":"https://api.github.com/users/leancloud/events{/privacy}","received_events_url":"https://api.github.com/users/leancloud/received_events","type":"Organization","site_admin":false},"repo":{"id":25067518,"name":"docs","full_name":"leancloud/docs","owner":{"login":"leancloud","id":6660518,"avatar_url":"https://avatars.githubusercontent.com/u/6660518?v=3","gravatar_id":"","url":"https://api.github.com/users/leancloud","html_url":"https://github.com/leancloud","followers_url":"https://api.github.com/users/leancloud/followers","following_url":"https://api.github.com/users/leancloud/following{/other_user}","gists_url":"https://api.github.com/users/leancloud/gists{/gist_id}","starred_url":"https://api.github.com/users/leancloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leancloud/subscriptions","organizations_url":"https://api.github.com/users/leancloud/orgs","repos_url":"https://api.github.com/users/leancloud/repos","events_url":"https://api.github.com/users/leancloud/events{/privacy}","received_events_url":"https://api.github.com/users/leancloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/leancloud/docs","description":"LeanCloud Documentation","fork":false,"url":"https://api.github.com/repos/leancloud/docs","forks_url":"https://api.github.com/repos/leancloud/docs/forks","keys_url":"https://api.github.com/repos/leancloud/docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/leancloud/docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/leancloud/docs/teams","hooks_url":"https://api.github.com/repos/leancloud/docs/hooks","issue_events_url":"https://api.github.com/repos/leancloud/docs/issues/events{/number}","events_url":"https://api.github.com/repos/leancloud/docs/events","assignees_url":"https://api.github.com/repos/leancloud/docs/assignees{/user}","branches_url":"https://api.github.com/repos/leancloud/docs/branches{/branch}","tags_url":"https://api.github.com/repos/leancloud/docs/tags","blobs_url":"https://api.github.com/repos/leancloud/docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/leancloud/docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/leancloud/docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/leancloud/docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/leancloud/docs/statuses/{sha}","languages_url":"https://api.github.com/repos/leancloud/docs/languages","stargazers_url":"https://api.github.com/repos/leancloud/docs/stargazers","contributors_url":"https://api.github.com/repos/leancloud/docs/contributors","subscribers_url":"https://api.github.com/repos/leancloud/docs/subscribers","subscription_url":"https://api.github.com/repos/leancloud/docs/subscription","commits_url":"https://api.github.com/repos/leancloud/docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/leancloud/docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/leancloud/docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/leancloud/docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/leancloud/docs/contents/{+path}","compare_url":"https://api.github.com/repos/leancloud/docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/leancloud/docs/merges","archive_url":"https://api.github.com/repos/leancloud/docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/leancloud/docs/downloads","issues_url":"https://api.github.com/repos/leancloud/docs/issues{/number}","pulls_url":"https://api.github.com/repos/leancloud/docs/pulls{/number}","milestones_url":"https://api.github.com/repos/leancloud/docs/milestones{/number}","notifications_url":"https://api.github.com/repos/leancloud/docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/leancloud/docs/labels{/name}","releases_url":"https://api.github.com/repos/leancloud/docs/releases{/id}","created_at":"2014-10-11T07:14:37Z","updated_at":"2015-06-13T15:24:46Z","pushed_at":"2015-06-16T10:32:50Z","git_url":"git://github.com/leancloud/docs.git","ssh_url":"git@github.com:leancloud/docs.git","clone_url":"https://github.com/leancloud/docs.git","svn_url":"https://github.com/leancloud/docs","homepage":"http://leancloud.cn/docs/","size":23272,"stargazers_count":74,"watchers_count":74,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":77,"mirror_url":null,"open_issues_count":35,"forks":77,"open_issues":35,"watchers":74,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/leancloud/docs/pulls/347"},"html":{"href":"https://github.com/leancloud/docs/pull/347"},"issue":{"href":"https://api.github.com/repos/leancloud/docs/issues/347"},"comments":{"href":"https://api.github.com/repos/leancloud/docs/issues/347/comments"},"review_comments":{"href":"https://api.github.com/repos/leancloud/docs/pulls/347/comments"},"review_comment":{"href":"https://api.github.com/repos/leancloud/docs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/leancloud/docs/pulls/347/commits"},"statuses":{"href":"https://api.github.com/repos/leancloud/docs/statuses/04b0c1b5cfbb65c70f3142456f72a03fc6844768"}}}}