Class: Prismdb::Client
- Inherits:
-
Object
- Object
- Prismdb::Client
- Defined in:
- lib/prismdb/client.rb
Instance Method Summary collapse
- #find_character(key) ⇒ Prismdb::Response
- #find_episode(key) ⇒ Prismdb::Response
- #find_live(key) ⇒ Prismdb::Response
- #find_series(key) ⇒ Prismdb::Response
- #find_song(key) ⇒ Prismdb::Response
- #get_characters ⇒ Array<Prismdb::Response>
- #get_episodes ⇒ Array<Prismdb::Response>
- #get_lives ⇒ Array<Prismdb::Response>
- #get_series ⇒ Array<Prismdb::Response>
- #get_songs ⇒ Array<Prismdb::Response>
Instance Method Details
#find_character(key) ⇒ Prismdb::Response
13 14 15 16 17 |
# File 'lib/prismdb/client.rb', line 13 def find_character(key) with_error_handling do connection.get("/api/character/#{key}").body end end |
#find_episode(key) ⇒ Prismdb::Response
29 30 31 32 33 |
# File 'lib/prismdb/client.rb', line 29 def find_episode(key) with_error_handling do connection.get("/api/episode/#{key}").body end end |
#find_live(key) ⇒ Prismdb::Response
61 62 63 64 65 |
# File 'lib/prismdb/client.rb', line 61 def find_live(key) with_error_handling do connection.get("/api/live/#{key}").body end end |
#find_series(key) ⇒ Prismdb::Response
77 78 79 80 81 |
# File 'lib/prismdb/client.rb', line 77 def find_series(key) with_error_handling do connection.get("/api/series/#{key}").body end end |
#find_song(key) ⇒ Prismdb::Response
45 46 47 48 49 |
# File 'lib/prismdb/client.rb', line 45 def find_song(key) with_error_handling do connection.get("/api/song/#{key}").body end end |
#get_characters ⇒ Array<Prismdb::Response>
4 5 6 7 8 |
# File 'lib/prismdb/client.rb', line 4 def get_characters with_error_handling do connection.get("/api/character").body["results"] end end |
#get_episodes ⇒ Array<Prismdb::Response>
20 21 22 23 24 |
# File 'lib/prismdb/client.rb', line 20 def get_episodes with_error_handling do connection.get("/api/episode").body["results"] end end |
#get_lives ⇒ Array<Prismdb::Response>
52 53 54 55 56 |
# File 'lib/prismdb/client.rb', line 52 def get_lives with_error_handling do connection.get("/api/live").body["results"] end end |
#get_series ⇒ Array<Prismdb::Response>
68 69 70 71 72 |
# File 'lib/prismdb/client.rb', line 68 def get_series with_error_handling do connection.get("/api/series").body["results"] end end |
#get_songs ⇒ Array<Prismdb::Response>
36 37 38 39 40 |
# File 'lib/prismdb/client.rb', line 36 def get_songs with_error_handling do connection.get("/api/song").body["results"] end end |