Skip to content

Commit

Permalink
Renamed records to items
Browse files Browse the repository at this point in the history
  • Loading branch information
gippy committed Jan 23, 2018
1 parent f142d7a commit 6c83744
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/datasets.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,35 +17,35 @@ import { checkParamOrThrow, gzipPromise, pluckData, catchNotFoundOrThrow, parseB
*
* const dataset = await datasets.getOrCreateDataset({ datasetName: 'my-dataset' });
* apifyClient.setOptions({ datasetId: dataset.id });
* await datasets.putRecord({
* await datasets.putItem({
* data: { foo: 'bar' }
* });
* const records = await datasets.getRecords();
* const items = await datasets.getItems();
* await datasets.deleteStore();
* ```
*
* Every method can be used as either promise or with callback. If your Node version supports await/async then you can await promise result.
* ```javascript
* // Awaited promise
* try {
* const records = await datasets.getRecords();
* // Do something with the records ...
* const items = await datasets.getItems();
* // Do something with the items ...
* } catch (err) {
* // Do something with error ...
* }
*
* // Promise
* datasets.getRecords()
* .then((records) => {
* // Do something with records ...
* datasets.getItems()
* .then((items) => {
* // Do something with items ...
* })
* .catch((err) => {
* // Do something with error ...
* });
*
* // Callback
* datasets.getRecords((err, records) => {
* // Do something with error or records ...
* datasets.getItems((err, items) => {
* // Do something with error or items ...
* });
* ```
* @namespace datasets
Expand Down Expand Up @@ -179,7 +179,7 @@ export default {
* @instance
* @param {Object} options
* @param {String} options.datasetId - Unique dataset Id
* @param {String} [options.format='json'] - Format of the records, possible values are: json, csv, xlsx, html, xml and rss.
* @param {String} [options.format='json'] - Format of the items, possible values are: json, csv, xlsx, html, xml and rss.
* @param {Number} [options.offset=0] - Number of array elements that should be skipped at the start.
* @param {Number} [options.limit=100000] - Maximum number of array elements to return.
* @param {Number} [options.desc] - If 1 then the objects are sorted by createdAt in descending order.
Expand All @@ -197,7 +197,7 @@ export default {
* @param {String} [options.xmlRow] - Overrides default element name that wraps each page or page function result object in xml output.
* By default the element name is page or result based on value of simplified parameter.
* @param callback
* @returns {DatasetRecords}
* @returns {DatasetItems}
*/
getItems: (requestPromise, options) => {
const {
Expand Down Expand Up @@ -264,7 +264,7 @@ export default {
},

/**
* Saves the record into dataset.
* Saves the item into dataset.
*
* @memberof ApifyClient.datasets
* @instance
Expand Down

0 comments on commit 6c83744

Please sign in to comment.