Class: CardDB::Publisher
Overview
Wrapper for Publisher objects
Instance Attribute Summary
Attributes inherited from Resource
#client, #data
Instance Method Summary
collapse
Methods inherited from Resource
#[], #initialize, #key?, #to_h, #to_json
Instance Method Details
#banner_url ⇒ Object
281
282
283
|
# File 'lib/carddb/collection.rb', line 281
def banner_url
data.dig('bannerFile', 'url')
end
|
#created_at ⇒ Object
285
286
287
|
# File 'lib/carddb/collection.rb', line 285
def created_at
parse_time(data['createdAt'])
end
|
#description ⇒ Object
264
265
266
|
# File 'lib/carddb/collection.rb', line 264
def description
data['description']
end
|
Fetch games belonging to this publisher. Results are cached after the first call.
298
299
300
|
# File 'lib/carddb/collection.rb', line 298
def games
@games ||= fetch_games
end
|
#id ⇒ Object
252
253
254
|
# File 'lib/carddb/collection.rb', line 252
def id
data['id']
end
|
#logo_url ⇒ Object
277
278
279
|
# File 'lib/carddb/collection.rb', line 277
def logo_url
data.dig('logoFile', 'url')
end
|
#name ⇒ Object
256
257
258
|
# File 'lib/carddb/collection.rb', line 256
def name
data['name']
end
|
#slug ⇒ Object
260
261
262
|
# File 'lib/carddb/collection.rb', line 260
def slug
data['slug']
end
|
#status ⇒ String
Returns Publisher status (‘ACTIVE` or `DEACTIVATED`).
273
274
275
|
# File 'lib/carddb/collection.rb', line 273
def status
data['status']
end
|
#updated_at ⇒ Object
289
290
291
|
# File 'lib/carddb/collection.rb', line 289
def updated_at
parse_time(data['updatedAt'])
end
|
#website ⇒ Object
268
269
270
|
# File 'lib/carddb/collection.rb', line 268
def website
data['website']
end
|