Class: DiscogsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/discogs/wishlist/data_fetchers/discogs_api.rb

Constant Summary collapse

MAX_RESULTS_PER_PAGE =
100

Instance Method Summary collapse

Instance Method Details

#fetch_authenticated_user_identityObject



6
7
8
# File 'lib/discogs/wishlist/data_fetchers/discogs_api.rb', line 6

def fetch_authenticated_user_identity
  discogs_api.get_identity
end

#fetch_by_username(username) ⇒ Object



10
11
12
# File 'lib/discogs/wishlist/data_fetchers/discogs_api.rb', line 10

def fetch_by_username(username)
  discogs_api.get_user_wantlist(username, per_page: MAX_RESULTS_PER_PAGE).wants
end

#get_release_by_id(id, currency) ⇒ Object



14
15
16
# File 'lib/discogs/wishlist/data_fetchers/discogs_api.rb', line 14

def get_release_by_id(id, currency)
  discogs_api.get_release(id, currency)
end