Skip to content

Latest commit

 

History

History
48 lines (27 loc) · 1.62 KB

README.md

File metadata and controls

48 lines (27 loc) · 1.62 KB

Pocket Classes Gem Version Build Status Dependency Status

Code Climate Inline docs

Classes to work with Pocket.

Pocket Classes on RubyGems.org

Installation

gem install pocket-classes

Or on Gemfile

gem 'pocket-classes', '~> 0.0.3'

New Item

item = Item.new

Tag Collection

item = Item.new
items = []
items.push(item)
tagCollection = TagCollection.new(items)

Get Tags from TagCollecion

tags = tagCollection.getTags

About TagCollection

TagCollection has a tags property.

tags property is a Hash.

Keys are tag terms (eg. 'history', 'ruby', 'jokes')

tag = tags['term1']

About tag

Tag is a Hash that contains useful counters.

tag['total']: Total of articles tagged with current tag
tag['archived']: Total of archived articles tagged with current tag
tag['unread']: Total of unread articles tagged with current tag. Note that this is complementary to 'archived' count.