Class: Giphy::Client
- Inherits:
-
Object
- Object
- Giphy::Client
- Defined in:
- lib/giphy/client.rb
Instance Method Summary collapse
- #artists(options = {}) ⇒ Object
- #favorite(id) ⇒ Object
- #favorites ⇒ Object
- #flag(id) ⇒ Object
- #flagged ⇒ Object
- #gif(id) ⇒ Object
- #gifs(ids) ⇒ Object
- #random ⇒ Object
- #recent(options = {}) ⇒ Object
- #screensaver(tag) ⇒ Object
- #search(keyword, options = {}) ⇒ Object
- #translate(word) ⇒ Object
Instance Method Details
#artists(options = {}) ⇒ Object
40 41 42 |
# File 'lib/giphy/client.rb', line 40 def artists(={}) get('/artists', ) end |
#favorite(id) ⇒ Object
24 25 26 |
# File 'lib/giphy/client.rb', line 24 def favorite(id) post("/#{id}/favorites") end |
#favorites ⇒ Object
28 29 30 |
# File 'lib/giphy/client.rb', line 28 def favorites get('/favorites') end |
#flag(id) ⇒ Object
16 17 18 |
# File 'lib/giphy/client.rb', line 16 def flag(id) post("/#{id}/flagged") end |
#flagged ⇒ Object
20 21 22 |
# File 'lib/giphy/client.rb', line 20 def flagged get('/flagged') end |
#gif(id) ⇒ Object
44 45 46 |
# File 'lib/giphy/client.rb', line 44 def gif(id) get("/#{id}") end |
#gifs(ids) ⇒ Object
48 49 50 |
# File 'lib/giphy/client.rb', line 48 def gifs(ids) get('', ids: ids.join(',')) end |
#random ⇒ Object
36 37 38 |
# File 'lib/giphy/client.rb', line 36 def random get('/random') end |
#recent(options = {}) ⇒ Object
3 4 5 |
# File 'lib/giphy/client.rb', line 3 def recent(={}) get('/recent', ) end |
#screensaver(tag) ⇒ Object
32 33 34 |
# File 'lib/giphy/client.rb', line 32 def screensaver(tag) get('/screensaver', tag: tag) end |
#search(keyword, options = {}) ⇒ Object
11 12 13 14 |
# File 'lib/giphy/client.rb', line 11 def search(keyword, ={}) = {q: keyword}.merge() get('/search', ) end |
#translate(word) ⇒ Object
7 8 9 |
# File 'lib/giphy/client.rb', line 7 def translate(word) get('/translate', s: word) end |