Skip to content

nonchosbatta/assonnato

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Assonnato

RESTful gem for wrapping Pigro's APIs.

Install

$ gem install assonnato

Usage

You can use Assonnato in two ways.

The first is creating a new instance of Assonnato...

require 'assonnato'

assonnato = Assonnato.new       HOST, PORT, SSL
user      = Assonnato::User.new assonnato
user.login 'Username', 'Password'

... while the second is performing direct calls to Assonnato fetching data from pigro.omnivium.it.

require 'assonnato'

assonnato.user.login 'Username', 'Password'

Examples

Get shows

assonnato.show.all :ongoing
assonnato.show.all :ongoing, :fansub => 'Omnivium'
assonnato.show.all :ongoing, :user   => 'Roxas Shadow'
assonnato.show.all :ongoing, { user: 'Roxas Shadow', role: :translator }
assonnato.show.get 'Strike the Blood'

Get episodes

assonnato.episode.all  'Strike the Blood'
assonnato.episode.get  'Strike the Blood', 1
assonnato.episode.last :ongoing

Edit an episode

login = assonnato.user.login 'Username', 'Password'
puts "#{login['status']}: #{login['message']}"

episode = assonnato.episode.edit 'Nisekoi', 8, { qchecking: :done }
puts "#{episode['status']}: #{episode['message']}"

logout = assonnato.user.logout
puts "#{logout['status']}: #{logout['message']}"

About

RESTful wrapper gem for pigro's APIs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages