Class: Untappd::User

Inherits:
Base
  • Object
show all
Defined in:
lib/untappd/user.rb

Class Method Summary collapse

Methods inherited from Base

auth_options, response_to_mash

Class Method Details

.badges(username, options = {}) ⇒ Object

options:

  • offset (int, optional) - The numeric offset that you what results to start



17
18
19
20
# File 'lib/untappd/user.rb', line 17

def self.badges(username, options={})
  options.merge!(auth_options)
  response_to_mash get("/user/badges/#{username}", :query => options)
end

.distinct(username, options = {}) ⇒ Object

options:

  • sort (string, optional) - Your can sort the results using these values:

date - sorts by date (default), checkin - sorted by highest checkin, global_rating - sorts by global rating, user_rating - sorted by the user’s rating

  • offset (int, optional) - The numeric offset that you what results to start



42
43
44
45
# File 'lib/untappd/user.rb', line 42

def self.distinct(username, options={})
  options.merge!(auth_options)
  response_to_mash get("/user/beers/#{username}", :query => options)
end

.feed(username, options = {}) ⇒ Object

options:

  • max_id (int, optional) - The checkin ID that you want the results to start with

  • limit (int, optional) - The number of results to return, max of 50, default is 25



6
7
8
9
# File 'lib/untappd/user.rb', line 6

def self.feed(username, options={})
  options.merge!(auth_options)
  response_to_mash get("/user/checkins/#{username}", :query => options)
end

.friend_feed(access_token, options = {}) ⇒ Object

options:

  • max_id (int, optional) - The checkin ID that you want the results to start with

  • limit (int, optional) - The number of results to return, max of 50, default is 25



50
51
52
53
# File 'lib/untappd/user.rb', line 50

def self.friend_feed(access_token, options={})
  options.merge!({:access_token => access_token})
  response_to_mash get("/checkin/recent", :query => options)
end

.friends(username, options = {}) ⇒ Object

options:

  • offset (int, optional) - The numeric offset that you what results to start

limit (optional) - The number of records that you will return (max 50)



25
26
27
28
# File 'lib/untappd/user.rb', line 25

def self.friends(username, options={})
  options.merge!(auth_options)
  response_to_mash get("/user/friends/#{username}", :query => options)
end

.info(username) ⇒ Object



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

def self.info(username)
  response_to_mash get("/user/info/#{username}", :query => auth_options)
end

.wish_list(username, options = {}) ⇒ Object

options:

  • offset (int, optional) - The numeric offset that you what results to start



32
33
34
35
# File 'lib/untappd/user.rb', line 32

def self.wish_list(username, options={})
  options.merge!(auth_options)
  response_to_mash get("/user/wishlist/#{username}", :query => options)
end