Skip to content

Engine API and Data Format

Dale Ma edited this page Jun 30, 2013 · 1 revision

#API namespace Greeby::Engine

##RSS ###initialize(url) Grabs rss feeds via the given url.

###parse Internal use for parsing rss.

###digest returns hashed string to distinguish from different RSS.

###to_json(options) Returns parsed RSS object in json format.

##Page ###initialize(url) Grabs web page via the given url.

###parse Internal use for parsing web page.

###digest returns hashed string to distinguish from different page.

###content returns parsed page content.

Data Format

A RSS channel object contains a title and many feeds. Call RSS#to_json to get this object.

##RSS

{
  channel: 'channel-name',
  language: 'channel-language',
  feeds: [
    {
      title: 'feed-title',
      link: 'feed-link',
      published_at: 'feed-published-time',
      content: 'feed-content-in-html'
    }, ...
  ]
}

Clone this wiki locally