Skip to content

Commit

Permalink
fix(docs): Fix parseEntries docs not showing
Browse files Browse the repository at this point in the history
  • Loading branch information
Khaledgarbaya committed Sep 15, 2016
1 parent 00ce3ed commit 33f3d64
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lib/create-contentful-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
* @prop {function} getEntries
* @prop {function} getAsset
* @prop {function} getAssets
* @prop {function} parseEntries
* @prop {function} sync
*/

Expand Down Expand Up @@ -195,12 +196,12 @@ export default function createContentfulApi ({http, shouldLinksResolve}) {
const resolveLinks = shouldLinksResolve(query)
return pagedSync(http, query, resolveLinks)
}

/**
* Parse raw json data into collection of entry objects.
* Links will be resolved also
* Parse raw json data into collection of entry objects.Links will be resolved also
* @memberof ContentfulClientAPI
* @param {Object} data json data represting collection of entries
* @example
* <pre>
* let data = {items: [
* {
* sys: {type: 'Entry', locale: 'en-US'},
Expand All @@ -225,9 +226,7 @@ export default function createContentfulApi ({http, shouldLinksResolve}) {
* console.log( data.items[0].fields.foo ); // undefined
* let parsedData = client.parseEntries(data);
* console.log( parsedData.items[0].fields.foo ); // foo
* </pre>
*
* */
*/
function parseEntries (data) {
return wrapEntryCollection(data, true, false)
}
Expand Down

0 comments on commit 33f3d64

Please sign in to comment.