Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/turadg/pocket-ruby
Ruby wrapper for the Pocket REST and Search APIs
https://github.com/turadg/pocket-ruby
Last synced: 3 months ago
JSON representation
Ruby wrapper for the Pocket REST and Search APIs
- Host: GitHub
- URL: https://github.com/turadg/pocket-ruby
- Owner: andyw8
- License: mit
- Created: 2012-12-10T22:32:07.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2023-03-17T05:40:39.000Z (over 1 year ago)
- Last Synced: 2024-04-18T06:36:59.786Z (7 months ago)
- Language: Ruby
- Homepage:
- Size: 1000 KB
- Stars: 102
- Watchers: 11
- Forks: 37
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
pocket-ruby
===========[![Code Climate](https://codeclimate.com/github/turadg/pocket-ruby.png)](https://codeclimate.com/github/turadg/pocket-ruby) [![Gem Version](https://badge.fury.io/rb/pocket-ruby.png)](http://badge.fury.io/rb/pocket-ruby)
Ruby API for v3 of the [Pocket API](http://getpocket.com/developer/docs/overview) (formerly Read It Later)
Written by and previously maintained by [@turadg](https://github.com/turadg).
# Usage
Clone the repo and refer to `demo-server.rb` for examples on how to interact with the Pocket API.
```sh
git clone
cd pocket-ruby
bundle install
ruby demo-server.rb
```*Note:* Changes to the `demo-server.rb` will require a restart to take effect (or you can use [rerun](https://github.com/alexch/rerun)).
Pocket-Ruby can be installed via the gem, ```gem install pocket-ruby```
Or via bundler, `gem 'pocket-ruby'`
## Pocket API Notes
Below are some aspects of the Pocket API that aren't covered in the official documentation, or that have been observed:
* For very long articles, the maximum reported `word_count` is 65535, even if the article is longer.
* If a `count` isn't specified, the `Retreive` call will return maximum of 5000 items.
* The API response may contain a number of undocumented fields, including:
* `amp_url`
* `domain_metadata`
* `is_index`
* `lang` ([ISO_639-1](https://en.wikipedia.org/wiki/ISO_639-1)?)
* `listen_duration_estimate`
* `sort_id`
* `time_to_read`
* `top_image_url`
* Every integer value is returned as a string, *except* for `time_to_read`, `listen_duration_estimate` and `sort_id`.
* The `time_to_read` is in minutes, but `listen_duration_estimate` is in seconds.
* If an article's `status` is `"2"` ('should be deleted') then most fields will not be present.