Class: Gifster::Explore

Inherits:
Object
  • Object
show all
Defined in:
lib/gifster.rb

Constant Summary collapse

DEV_API_KEY =
"dc6zaTOxFJmzC"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_key = DEV_API_KEY) ⇒ Explore

Returns a new instance of Explore.



11
12
13
# File 'lib/gifster.rb', line 11

def initialize(api_key=DEV_API_KEY)
  @client = Gifster::Client.new(api_key)
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



9
10
11
# File 'lib/gifster.rb', line 9

def client
  @client
end

Instance Method Details

#search(query, limit = 25, offset = 0) ⇒ Object



19
20
21
# File 'lib/gifster.rb', line 19

def search(query, limit=25, offset=0)
  Gifster::Result.build(client.search(query, limit, offset))
end


15
16
17
# File 'lib/gifster.rb', line 15

def trending(limit=25, offset=0)
  Gifster::Result.build(client.trending(limit, offset))
end