Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEEDS: add limit params to fetch verb #136

Closed
silverbucket opened this issue Nov 24, 2013 · 1 comment
Closed

FEEDS: add limit params to fetch verb #136

silverbucket opened this issue Nov 24, 2013 · 1 comment
Assignees

Comments

@silverbucket
Copy link
Member

when fetching data, it would be nice to have limitation options:

verb: 'fetch',
object: {
  limit: 10, // number of entries to return
  afterDateNum: 1300200, // date number to compare as cutoff
  afterId: '...' // a string that can be interpreted by the platform as to what to match it to, but it can be used instead of fromDateNum.
  beforeDateNum: " ",
  beforeId: " "
}
@silverbucket
Copy link
Member Author

/**
   * Function: fetch
   *
   * Fetches feeds from specified source.
   *
   * Parameters:
   *
   *   job - Activity streams object containing job data:
   *         {
   *           actor: {
   *             address: 'feeds'
   *           },
   *           verb: "fetch",
   *           target: [
   *             {
   *               address: '[feed_url]'
   *             },
   *             ...
   *           ],
   *           object: {
   *             limit: 10,    // default 10
   *             from: 'after' // returns articles *after* the date string
   *                           // other valid value is 'before'
   *             date: 'Tue Nov 26 2013 02:11:59 GMT+0100 (CET)',
   *             // ... OR ...
   *             link: 'http://www.news.com/articles/man-eats-car',
   *           }
   *         }
   *
   *         Without any properties specified, the platform will return most
   *         recent 20 articles fetched from the feed.
   *
   *         `date` - can be a date string, or seconds since 1970.
   *                if set to 0, then the platform will return either the
   *                most recent (from: 'before') or the oldest (from: 'after')
   *                up to `limit`;
   *
   * Returns:
   *
   *   Sends back an message with an AS object for each article, and upon
   *   completion it will send back a response to the original request with a
   *   complete list of URLs in the feed and total count.
   *
   */

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant