module Loadgif::Search
Public Instance Methods
favorite(id)
click to toggle source
# File lib/loadgif/search.rb, line 18 def favorite(id) result = client.favorite(id) favorite_gif.new(result) end
favorites(username, options)
click to toggle source
# File lib/loadgif/search.rb, line 23 def favorites(username, options) result = client.favorites(username, options) favorite_gif.build_batch_from(result) end
gif_by_id(*ids)
click to toggle source
# File lib/loadgif/search.rb, line 38 def gif_by_id(*ids) GifByID.new.get(ids) end
random(tag='')
click to toggle source
# File lib/loadgif/search.rb, line 33 def random(tag='') result = client.random(tag) random_gif.new(result) end
screensaver(tag)
click to toggle source
# File lib/loadgif/search.rb, line 28 def screensaver(tag) result = client.screensaver(tag) gif.new(result) end
search(keyword, options={})
click to toggle source
# File lib/loadgif/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/loadgif/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/loadgif/search.rb, line 3 def trending(options={}) result = client.trending(options) gif.build_batch_from(result) end
Private Instance Methods
client()
click to toggle source
# File lib/loadgif/search.rb, line 44 def client Loadgif::Client.new end
favorite_gif()
click to toggle source
# File lib/loadgif/search.rb, line 52 def favorite_gif Loadgif::FavoriteGif end
gif()
click to toggle source
# File lib/loadgif/search.rb, line 48 def gif Loadgif::Gif end
random_gif()
click to toggle source
# File lib/loadgif/search.rb, line 56 def random_gif Loadgif::RandomGif end