Giter VIP home page Giter VIP logo

rsstools-pharo's Introduction

RSSTools-Pharo

Objects to work with RSS feeds and the Fever API.

  • Pharo 8 reference platform.
  • Examples and tests included.

TODO

  • Support the latest Pharo release.

Installation

In a Pharo playground, Do it:

Metacello new 
  repository: 'github://brackendev/RSSTools-Pharo/src';
  baseline: 'RSSTools';
  load.

Example Usage

RSS Feeds

In a Playground, Do it:

RSSTools exampleCreateRSSFeedWithURL.
RSSTools exampleCreateRSSFeedWithXMLDocument.
RSSTools exampleXMLDocumentWithRSSFeed.
"Create RSS feed object from RSS 2.0 URL"
rssFeed := RSSTools createRSSFeedFor: 'https://gist.githubusercontent.com/brackendev/95b25e1b7128f326969eb5060f5d591c/raw/f7978c779bcb00aaa5a6551936e2387590cb303f/sample-rss-2.0-feed.xml'.

"Create RSS 2.0 XML from feed object"
RSSTools createXMLWith: rssFeed.
"Create RSS feed object"

items := OrderedCollection new.

rssFeedItem := RSSFeedItem new 
title: 'Item 1';
description: 'Item Description';
link: 'http://www.hostname.com/'.

items add: rssFeedItem.

rssFeedItem := RSSFeedItem new 
title: 'Item 2';
description: 'Item Description';
link: 'http://www.hostname.com/'.

items add: rssFeedItem.

rssFeedOptionalItems := RSSFeedOptionalItems new 
items: items.

rssFeedRequiredItems := RSSFeedRequiredItems new 
title: 'RSS Feed';
description: 'Feed Description';
link: 'http://www.hostname.com/'.

rssFeed := RSSTools createRSSFeedWith: rssFeedRequiredItems and: rssFeedOptionalItems.

"Create RSS 2.0 XML from feed object"
RSSTools createXMLWith: rssFeed.

Fever API

In a Playground, Do it:

"Create a Fever session"
feverSession := FeverSession sessionWith: 'domain.com' email: '[email protected]' password: 'password'.

"Retrieve feeds"
FeverTools retrieveFeedsFor: feverSession.

"Retrieve groups"
FeverTools retrieveGroupsFor: feverSession.

"Retrieve Hot Links"
FeverTools retrieveHotLinksFor: feverSession page: 1 days: 1.

"Retrieve items"
FeverTools retrieveItemsFor: feverSession.

Acknowledgements

This project makes use of the following third-party libraries:

Author

Bracken Spencer

License

RSSTools-Pharo is released under the MIT license. See the LICENSE file for more info.

rsstools-pharo's People

Contributors

brackendev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

ducasse

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.