Phish.in API Client
Talks to the http://phish.in API. Has built-in caching.
Installation
gem install phishin-client
Getting Started
require 'phishin-client'
doglogger = Logger.new
c = Phishin::Client.new(log: true, logger: doglogger, cache_options: { memcached_servers: ['localhost:11211'] })
# to not use caching, specify the :cache => false option
p = Phishin::Client.new(cache: false)
response = c.tracks(params: { page: 1, per_page: 40 }) # Phishin::Api::Response instance
json_hash = response.data
# no caching for this request
response = c.tracks(params: { page: 1, per_page: 40 }, force: true) # Phishin::Api::Response instance
Info on releasing:
rake -T
rake release
License
Please see LICENSE.
Author
Alex Bird @alexebird. Big thanks to @phish_in.