module Giphy::Search
Public Instance Methods
artists()
click to toggle source
# File lib/giphy/search.rb, line 48 def artists result = client.artists artist.build_batch_from(result) end
favorite(id)
click to toggle source
# File lib/giphy/search.rb, line 28 def favorite(id) result = client.favorite(id) favorite_gif.new(result) end
favorites(username, options)
click to toggle source
# File lib/giphy/search.rb, line 33 def favorites(username, options) result = client.favorites(username, options) favorite_gif.build_batch_from(result) end
flag(id)
click to toggle source
# File lib/giphy/search.rb, line 18 def flag(id) result = client.flag(id) flagged_gif.new(result) end
flagged()
click to toggle source
# File lib/giphy/search.rb, line 23 def flagged result = client.flagged flagged_gif.build_batch_from(result) end
gif_by_artist(username, options={})
click to toggle source
# File lib/giphy/search.rb, line 53 def gif_by_artist(username, options={}) options_hash = {username: username}.merge(options) result = client.artists(options_hash) gif.build_batch_from(result) end
gif_by_id(*ids)
click to toggle source
# File lib/giphy/search.rb, line 59 def gif_by_id(*ids) GifByID.new.get(ids) end
random(tag='')
click to toggle source
# File lib/giphy/search.rb, line 43 def random(tag='') result = client.random(tag) random_gif.new(result) end
screensaver(tag)
click to toggle source
# File lib/giphy/search.rb, line 38 def screensaver(tag) result = client.screensaver(tag) gif.new(result) end
search(keyword, options={})
click to toggle source
# File lib/giphy/search.rb, line 13 def search(keyword, options={}) result = client.search(keyword, options) gif.build_batch_from(result) end
translate(word)
click to toggle source
# File lib/giphy/search.rb, line 8 def translate(word) result = client.translate(word) gif.build_batch_from(result) end
trending(options={})
click to toggle source
# File lib/giphy/search.rb, line 3 def trending(options={}) result = client.trending(options) gif.build_batch_from(result) end
Private Instance Methods
artist()
click to toggle source
# File lib/giphy/search.rb, line 85 def artist Giphy::Artist end
client()
click to toggle source
# File lib/giphy/search.rb, line 65 def client Giphy::Client.new end
favorite_gif()
click to toggle source
# File lib/giphy/search.rb, line 77 def favorite_gif Giphy::FavoriteGif end
flagged_gif()
click to toggle source
# File lib/giphy/search.rb, line 73 def flagged_gif Giphy::FlaggedGif end
gif()
click to toggle source
# File lib/giphy/search.rb, line 69 def gif Giphy::Gif end
random_gif()
click to toggle source
# File lib/giphy/search.rb, line 81 def random_gif Giphy::RandomGif end