Permalink
Browse files

Fixed markdown.

  • Loading branch information...
GeReV committed Apr 29, 2012
1 parent 9dee149 commit e15583f607c4bdd0fead8c52a0ad631209327451
Showing with 16 additions and 4 deletions.
  1. +4 −4 README.md
  2. +12 −0 README.md~
View
@@ -7,18 +7,18 @@ A Backbone collection with paging and simple caching capabilities
`var collection = new Backbone.PagedCollection(models, [options]);`
-PagedCollection accepts the same options as Backbone.Collection, with the following additions:
-***perPage***: number of items to display per page, defaults to `10`.
+PagedCollection accepts the same options as Backbone.Collection, with the following additions:
+***perPage***: number of items to display per page, defaults to `10`.
***collection***: type of collection to use as the page collection, defaults to `Backbone.Collection`.
## Server-side Integration ##
PagedCollection expects server responses to be of the following format:
-`js
+```js
{
total: [total],
per_page: [per_page],
page: [current_page],
items: [array_of_items]
-}`
+}```
View
@@ -10,3 +10,15 @@ A Backbone collection with paging and simple caching capabilities
PagedCollection accepts the same options as Backbone.Collection, with the following additions:
***perPage***: number of items to display per page, defaults to `10`.
***collection***: type of collection to use as the page collection, defaults to `Backbone.Collection`.
+
+## Server-side Integration ##
+
+PagedCollection expects server responses to be of the following format:
+
+```js
+{
+ total: [total],
+ per_page: [per_page],
+ page: [current_page],
+ items: [array_of_items]
+}```

0 comments on commit e15583f

Please sign in to comment.