Class: DribbbleBucketApi::PublicSite

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/dribbble_bucket_api/public_site.rb

Instance Method Summary collapse

Instance Method Details

#bucket_contents(options) ⇒ Object



23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/dribbble_bucket_api/public_site.rb', line 23

def bucket_contents(options)
  response = load_bucket_contents(options)
  # ensure it was a successful response
  unless response.code == 200
    raise StandardError, %Q(
      Response returned #{response.code}
      URI: #{response.request.path}
    )
  end
  # return the object
  ShotIndexParser.new(response.body, options)
end

#user_buckets(options) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/dribbble_bucket_api/public_site.rb', line 10

def user_buckets(options)
  response = load_user_buckets(options)
  # ensure it was a successful response
  unless response.code == 200
    raise StandardError, %Q(
      Response returned #{response.code}
      URI: #{response.request.path}
    )
  end
  # return the object
  BucketIndexParser.new(response.body, options)
end