Module: F00px::Api::Photos

Included in:
Client
Defined in:
lib/f00px/api/photos.rb

Defined Under Namespace

Classes: Builder

Instance Method Summary collapse

Instance Method Details



5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/f00px/api/photos.rb', line 5

def popular(*args)
  options = get_options(args)
  builder = args.first
  builder ||= Builder.new

  params = builder
    .feature('popular')
    .options(options)
    .build

  self.get('photos', params)
end

#user_photos(*args) ⇒ Object



18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/f00px/api/photos.rb', line 18

def user_photos(*args)
  options = get_options(args)
  user_id, builder = args
  builder ||= Builder.new

  params = builder
    .feature('user')
    .user_id(user_id)
    .options(options)
    .build

  self.get('photos', params)
end