class DiscogsApi
Constants
- MAX_RESULTS_PER_PAGE
Public Instance Methods
fetch_authenticated_user_identity()
click to toggle source
# 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)
click to toggle source
# 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)
click to toggle source
# 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
Private Instance Methods
discogs_api()
click to toggle source
# File lib/discogs/wishlist/data_fetchers/discogs_api.rb, line 20 def discogs_api @discogs_api ||= Discogs::Wrapper.new(discogs_app_name, user_token: discogs_user_token) end
discogs_app_name()
click to toggle source
# File lib/discogs/wishlist/data_fetchers/discogs_api.rb, line 24 def discogs_app_name ENV["DISCOGS_APP_NAME"] || "discogs-wishlist" end
discogs_user_token()
click to toggle source
# File lib/discogs/wishlist/data_fetchers/discogs_api.rb, line 28 def discogs_user_token ENV["DISCOGS_USER_TOKEN"] end