Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
ccf908a6
Commit
ccf908a6
authored
Jul 19, 2015
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document that previous and next RSM methods take limit parameter.
updates #306
parent
7ff38896
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
docs/source/development.rst
docs/source/development.rst
+5
-6
No files found.
docs/source/development.rst
View file @
ccf908a6
...
...
@@ -304,7 +304,8 @@ as two utility methods ``next``, and ``previous``.
When you call one of these utility methods on the returned RSM object, and then
pass the result into a new query, you'll receive the next or previous batch of
archived messages.
archived messages. Please note, when calling these methods, pass in an integer
to limit your results.
.. code-block:: javascript
...
...
@@ -312,7 +313,7 @@ archived messages.
// Do something with the messages, like showing them in your webpage.
// ...
// You can now use the returned "rsm" object, to fetch the next batch of messages:
converse.archive.query(rsm.next(), callback, errback))
converse.archive.query(rsm.next(
10
), callback, errback))
}
converse.archive.query({'with': 'john@doe.net', 'max':10}, callback, errback);
...
...
@@ -330,10 +331,8 @@ message, pass in the ``before`` parameter with an empty string value ``''``.
// Do something with the messages, like showing them in your webpage.
// ...
// You can now use the returned "rsm" object, to fetch the previous batch of messages:
rsm.previous(); // Call previous method, to update the object
// parameters so that the previous batch of messages will be returned.
rsm.count = 10; // Increase the page size (currently it's set to 1,
// because that was what we specified in our last query.
rsm.previous(5); // Call previous method, to update the object's parameters,
// passing in a limit value of 5.
// Now we query again, to get the previous batch.
converse.archive.query(rsm, callback, errback);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment