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
291
292
293
|
# File 'lib/carddb/collection.rb', line 291
def banner_url
data.dig('bannerFile', 'url')
end
|
#created_at ⇒ Object
295
296
297
|
# File 'lib/carddb/collection.rb', line 295
def created_at
parse_time(data['createdAt'])
end
|
#description ⇒ Object
274
275
276
|
# File 'lib/carddb/collection.rb', line 274
def description
data['description']
end
|
Fetch games belonging to this publisher. Results are cached after the first call.
308
309
310
|
# File 'lib/carddb/collection.rb', line 308
def games
@games ||= fetch_games
end
|
#id ⇒ Object
262
263
264
|
# File 'lib/carddb/collection.rb', line 262
def id
data['id']
end
|
#logo_url ⇒ Object
287
288
289
|
# File 'lib/carddb/collection.rb', line 287
def logo_url
data.dig('logoFile', 'url')
end
|
#name ⇒ Object
266
267
268
|
# File 'lib/carddb/collection.rb', line 266
def name
data['name']
end
|
#slug ⇒ Object
270
271
272
|
# File 'lib/carddb/collection.rb', line 270
def slug
data['slug']
end
|
#status ⇒ String
Returns Publisher status (‘ACTIVE` or `DEACTIVATED`).
283
284
285
|
# File 'lib/carddb/collection.rb', line 283
def status
data['status']
end
|
#updated_at ⇒ Object
299
300
301
|
# File 'lib/carddb/collection.rb', line 299
def updated_at
parse_time(data['updatedAt'])
end
|
#website ⇒ Object
278
279
280
|
# File 'lib/carddb/collection.rb', line 278
def website
data['website']
end
|