rawg_api 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +13 -0
  3. data/.travis.yml +6 -0
  4. data/CODE_OF_CONDUCT.md +74 -0
  5. data/Gemfile +4 -0
  6. data/Gemfile.lock +97 -0
  7. data/LICENSE.txt +21 -0
  8. data/README.md +234 -0
  9. data/Rakefile +10 -0
  10. data/bin/console +14 -0
  11. data/bin/setup +8 -0
  12. data/lib/rawg_api/boot.rb +39 -0
  13. data/lib/rawg_api/clients/base_client.rb +31 -0
  14. data/lib/rawg_api/clients/creator_roles.rb +12 -0
  15. data/lib/rawg_api/clients/creators.rb +16 -0
  16. data/lib/rawg_api/clients/developers.rb +16 -0
  17. data/lib/rawg_api/clients/game/achievements.rb +14 -0
  18. data/lib/rawg_api/clients/game/additions.rb +14 -0
  19. data/lib/rawg_api/clients/game/details.rb +14 -0
  20. data/lib/rawg_api/clients/game/development_team.rb +14 -0
  21. data/lib/rawg_api/clients/game/parent_games.rb +14 -0
  22. data/lib/rawg_api/clients/game/reddit.rb +14 -0
  23. data/lib/rawg_api/clients/game/screenshots.rb +14 -0
  24. data/lib/rawg_api/clients/game/series.rb +14 -0
  25. data/lib/rawg_api/clients/game/stores.rb +14 -0
  26. data/lib/rawg_api/clients/game/suggested_games.rb +14 -0
  27. data/lib/rawg_api/clients/game/trailers.rb +14 -0
  28. data/lib/rawg_api/clients/game/twich.rb +14 -0
  29. data/lib/rawg_api/clients/game/youtube.rb +14 -0
  30. data/lib/rawg_api/clients/games.rb +51 -0
  31. data/lib/rawg_api/clients/genres.rb +16 -0
  32. data/lib/rawg_api/clients/parent_platforms.rb +11 -0
  33. data/lib/rawg_api/clients/platforms.rb +16 -0
  34. data/lib/rawg_api/clients/publishers.rb +16 -0
  35. data/lib/rawg_api/clients/stores.rb +16 -0
  36. data/lib/rawg_api/clients/tag_details.rb +12 -0
  37. data/lib/rawg_api/clients/tags.rb +12 -0
  38. data/lib/rawg_api/configuration.rb +47 -0
  39. data/lib/rawg_api/entities/base_entity.rb +54 -0
  40. data/lib/rawg_api/entities/creator.rb +9 -0
  41. data/lib/rawg_api/entities/creator_role.rb +9 -0
  42. data/lib/rawg_api/entities/developer.rb +9 -0
  43. data/lib/rawg_api/entities/game/achievements.rb +11 -0
  44. data/lib/rawg_api/entities/game/additions.rb +13 -0
  45. data/lib/rawg_api/entities/game/details.rb +20 -0
  46. data/lib/rawg_api/entities/game/development_team.rb +11 -0
  47. data/lib/rawg_api/entities/game/entity.rb +25 -0
  48. data/lib/rawg_api/entities/game/parent_games.rb +13 -0
  49. data/lib/rawg_api/entities/game/reddit.rb +11 -0
  50. data/lib/rawg_api/entities/game/screenshots.rb +11 -0
  51. data/lib/rawg_api/entities/game/series.rb +13 -0
  52. data/lib/rawg_api/entities/game/stores.rb +11 -0
  53. data/lib/rawg_api/entities/game/suggested_games.rb +11 -0
  54. data/lib/rawg_api/entities/game/trailers.rb +11 -0
  55. data/lib/rawg_api/entities/game/twitch.rb +12 -0
  56. data/lib/rawg_api/entities/game/youtube.rb +13 -0
  57. data/lib/rawg_api/entities/genre.rb +9 -0
  58. data/lib/rawg_api/entities/parent_platform.rb +9 -0
  59. data/lib/rawg_api/entities/platform.rb +9 -0
  60. data/lib/rawg_api/entities/publisher.rb +9 -0
  61. data/lib/rawg_api/entities/store.rb +9 -0
  62. data/lib/rawg_api/entities/tag.rb +11 -0
  63. data/lib/rawg_api/entities/tag_details.rb +9 -0
  64. data/lib/rawg_api/extensions/dry_monads.rb +12 -0
  65. data/lib/rawg_api/version.rb +3 -0
  66. data/lib/rawg_api.rb +6 -0
  67. data/rawg_api.gemspec +43 -0
  68. metadata +311 -0
@@ -0,0 +1,14 @@
1
+ module RawgApi
2
+ module Clients
3
+ class Games
4
+ class ParentGames < Clients::BaseClient
5
+ rawg_api :'parent-games'
6
+
7
+ def find(id, page: 1, page_size: DEFAULT_PAGE_SIZE)
8
+ get(prefix: [:games, id], params: {page: page, page_size: page_size})
9
+ end
10
+
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ module RawgApi
2
+ module Clients
3
+ class Games
4
+ class Reddit < Clients::BaseClient
5
+ rawg_api :reddit
6
+
7
+ def find(id, page: 1, page_size: DEFAULT_PAGE_SIZE)
8
+ get(prefix: [:games, id], params: {page: page, page_size: page_size})
9
+ end
10
+
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ module RawgApi
2
+ module Clients
3
+ class Games
4
+ class Screenshots < Clients::BaseClient
5
+ rawg_api :'screenshots'
6
+
7
+ def find(id, page: 1, page_size: DEFAULT_PAGE_SIZE)
8
+ get(prefix: [:games, id], params: {page: page, page_size: page_size})
9
+ end
10
+
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ module RawgApi
2
+ module Clients
3
+ class Games
4
+ class Series < Clients::BaseClient
5
+ rawg_api :'game-series'
6
+
7
+ def find(id, page: 1, page_size: DEFAULT_PAGE_SIZE)
8
+ get(prefix: [:games, id], params: {page: page, page_size: page_size})
9
+ end
10
+
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ module RawgApi
2
+ module Clients
3
+ class Games
4
+ class Stores < Clients::BaseClient
5
+ rawg_api :stores
6
+
7
+ def find(id, page: 1, page_size: DEFAULT_PAGE_SIZE)
8
+ get(prefix: [:games, id], params: {page: page, page_size: page_size})
9
+ end
10
+
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ module RawgApi
2
+ module Clients
3
+ class Games
4
+ class SuggestedGames < Clients::BaseClient
5
+ rawg_api :suggested
6
+
7
+ def find(id, page: 1, page_size: DEFAULT_PAGE_SIZE)
8
+ get(prefix: [:games, id], params: {page: page, page_size: page_size})
9
+ end
10
+
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ module RawgApi
2
+ module Clients
3
+ class Games
4
+ class Trailers < Clients::BaseClient
5
+ rawg_api :movies
6
+
7
+ def find(id, page: 1, page_size: DEFAULT_PAGE_SIZE)
8
+ get(prefix: [:games, id], params: {page: page, page_size: page_size})
9
+ end
10
+
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ module RawgApi
2
+ module Clients
3
+ class Games
4
+ class Twitch < Clients::BaseClient
5
+ rawg_api :twitch
6
+
7
+ def find(id, page: 1, page_size: DEFAULT_PAGE_SIZE)
8
+ get(prefix: [:games, id], params: {page: page, page_size: page_size})
9
+ end
10
+
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ module RawgApi
2
+ module Clients
3
+ class Games
4
+ class Youtube < Clients::BaseClient
5
+ rawg_api :youtube
6
+
7
+ def find(id, page: 1, page_size: DEFAULT_PAGE_SIZE)
8
+ get(prefix: [:games, id], params: {page: page, page_size: page_size})
9
+ end
10
+
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,51 @@
1
+ module RawgApi
2
+ module Clients
3
+ class Games < BaseClient
4
+ rawg_api :games
5
+
6
+ def all(page: 1, page_size: DEFAULT_PAGE_SIZE)
7
+ get(params: {page: page, page_size: page_size})
8
+ end
9
+
10
+ def search(page: 1, page_size: DEFAULT_PAGE_SIZE, title: nil, exclude_collection: nil,
11
+ exclude_parents: nil, exclude_game_series: nil, order: nil,
12
+ parent_platforms: [], platforms: [], stores: [], developers: [],
13
+ publishers: [], genres: [], tags: [], creators: [], dates: [],
14
+ platforms_count: [])
15
+
16
+ search_params = build_search_params(binding)
17
+ get(params: search_params)
18
+ end
19
+
20
+ private
21
+
22
+ def build_search_params(m_binding)
23
+ params = key_params_to_hash(m_binding)
24
+ params.map { |k, v| [transform_key(k), transform_value(k, v)] }.to_h
25
+ end
26
+
27
+ def values_transformer
28
+ @values_transformer ||= {
29
+ parent_platforms: array_join_transformer,
30
+ platforms: array_join_transformer,
31
+ stores: array_join_transformer,
32
+ developers: array_join_transformer,
33
+ publishers: array_join_transformer,
34
+ genres: array_join_transformer,
35
+ tags: array_join_transformer,
36
+ creators: array_join_transformer,
37
+ dates: array_join_transformer,
38
+ platforms_count: array_join_transformer
39
+ }
40
+ end
41
+
42
+ def keys_transformer
43
+ @keys_transformer ||= {
44
+ title: :search,
45
+ order: :ordering
46
+ }
47
+ end
48
+
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,16 @@
1
+ module RawgApi
2
+ module Clients
3
+ class Genres < BaseClient
4
+ rawg_api :genres
5
+
6
+ def all(page: 1, page_size: DEFAULT_PAGE_SIZE)
7
+ get(params: {page: page, page_size: page_size})
8
+ end
9
+
10
+ def find(id)
11
+ get(id)
12
+ end
13
+
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,11 @@
1
+ module RawgApi
2
+ module Clients
3
+ class ParentPlatforms < BaseClient
4
+ rawg_api :platforms
5
+
6
+ def all(page: 1, page_size: DEFAULT_PAGE_SIZE)
7
+ get('lists/parents', params: {page: page, page_size: page_size})
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,16 @@
1
+ module RawgApi
2
+ module Clients
3
+ class Platforms < BaseClient
4
+ rawg_api :platforms
5
+
6
+ def all(page: 1, page_size: DEFAULT_PAGE_SIZE)
7
+ get(params: {page: page, page_size: page_size})
8
+ end
9
+
10
+ def find(id)
11
+ get(id)
12
+ end
13
+
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ module RawgApi
2
+ module Clients
3
+ class Publishers < BaseClient
4
+ rawg_api :publishers
5
+
6
+ def all(page: 1, page_size: DEFAULT_PAGE_SIZE)
7
+ get(params: {page: page, page_size: page_size})
8
+ end
9
+
10
+ def find(id)
11
+ get(id)
12
+ end
13
+
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ module RawgApi
2
+ module Clients
3
+ class Stores < BaseClient
4
+ rawg_api :stores
5
+
6
+ def all(page: 1, page_size: DEFAULT_PAGE_SIZE)
7
+ get(params: {page: page, page_size: page_size})
8
+ end
9
+
10
+ def find(id)
11
+ get(id)
12
+ end
13
+
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,12 @@
1
+ module RawgApi
2
+ module Clients
3
+ class TagDetails < BaseClient
4
+ rawg_api :tags
5
+
6
+ def find(id)
7
+ get(id)
8
+ end
9
+
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,12 @@
1
+ module RawgApi
2
+ module Clients
3
+ class Tags < BaseClient
4
+ rawg_api :tags
5
+
6
+ def all(page: 1, page_size: DEFAULT_PAGE_SIZE)
7
+ get(params: {page: page, page_size: page_size})
8
+ end
9
+
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,47 @@
1
+ module RawgApi
2
+
3
+ class << self
4
+ attr_accessor :configuration
5
+ end
6
+
7
+ def self.configure
8
+ self.configuration ||= Configuration.new
9
+ yield(configuration)
10
+ end
11
+
12
+ class Configuration
13
+ DEFAULT_API_ENDPOINT = 'https://api.rawg.io/api'
14
+ DEFAULT_APP_NAME = 'Rawg.io Ruby Client (rawg_api)'
15
+ DEFAULT_PAGE_SIZE = 50
16
+
17
+ attr_accessor :endpoint, :app_name, :headers, :page_size
18
+
19
+ def initialize
20
+ @endpoint ||= DEFAULT_API_ENDPOINT
21
+ @app_name ||= DEFAULT_APP_NAME
22
+ @page_size ||= DEFAULT_PAGE_SIZE
23
+ ::ApiStruct::Settings.configure do |config|
24
+ config.endpoints = build_config[:endpoints]
25
+ end
26
+ end
27
+
28
+ def build_config
29
+ {
30
+ endpoints: {
31
+ rawg_api: {
32
+ root: @endpoint,
33
+ headers: api_headers
34
+ }
35
+ }
36
+ }
37
+ end
38
+
39
+ def api_headers
40
+ (headers || {}).merge({'User-Agent': @app_name})
41
+ end
42
+
43
+ end
44
+ end
45
+
46
+ RawgApi.configure do |config|
47
+ end
@@ -0,0 +1,54 @@
1
+ require_relative '../extensions/dry_monads'
2
+ module RawgApi
3
+ module Entities
4
+ EntityResponse = Struct.new(:metadata, :results)
5
+
6
+ # Workaround to silence Hashie warnings logger
7
+ class BaseEntityHashie < Hashie::Mash
8
+ disable_warnings
9
+ end
10
+
11
+ class BaseEntity < ::ApiStruct::Entity
12
+ extend RawgApi::Extensions::DryMonads
13
+
14
+ class << self
15
+ attr_accessor :delegated_methods
16
+
17
+ def delegate_method(resolver_klass = nil, *args)
18
+ define_method = args[0].to_sym
19
+ call_method = args[1].to_sym
20
+ define_singleton_method(define_method) do |*attrs|
21
+ id = attrs.shift
22
+ args = attrs.shift || {}
23
+ if args.empty?
24
+ resolver_klass.send(call_method, id)
25
+ else
26
+ resolver_klass.send(call_method, id, **args)
27
+ end
28
+ end
29
+ self.delegated_methods ||= {}
30
+ self.delegated_methods[define_method] = {class: resolver_klass, method: call_method}
31
+ end
32
+
33
+ def collection(entities, entity_type = self)
34
+ if !entities.is_a?(Array) && entities.key?(:results)
35
+ metadata = entities.dup
36
+ metadata.delete(:results)
37
+ results = ::ApiStruct::Collection.new(entities[:results], entity_type)
38
+ EntityResponse.new(metadata, results)
39
+ else
40
+ ::ApiStruct::Collection.new(entities, entity_type)
41
+ end
42
+ end
43
+ end
44
+
45
+ def initialize(entity, entity_status = true)
46
+ raise EntityError, "#{entity} must be Hash" unless entity.is_a?(Hash)
47
+ @entity = BaseEntityHashie.new(extract_attributes(entity))
48
+ @entity_status = entity_status
49
+ __setobj__(@entity)
50
+ end
51
+
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,9 @@
1
+ module RawgApi
2
+ module Entities
3
+ class Creator < BaseEntity
4
+ client_service Clients::Creators
5
+
6
+ attr_entity :id, :name, :slug, :image, :image_background, :games_count
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module RawgApi
2
+ module Entities
3
+ class CreatorRole < BaseEntity
4
+ client_service Clients::CreatorRoles
5
+
6
+ attr_entity :id, :name, :slug
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module RawgApi
2
+ module Entities
3
+ class Developer < BaseEntity
4
+ client_service Clients::Developers
5
+
6
+ attr_entity :id, :name, :slug, :games_count, :image_background
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,11 @@
1
+ module RawgApi
2
+ module Entities
3
+ class Game
4
+ class Achievements < Entities::BaseEntity
5
+ client_service Clients::Games::Achievements
6
+
7
+ attr_entity :id, :name, :description, :image, :percent
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,13 @@
1
+ module RawgApi
2
+ module Entities
3
+ class Game
4
+ class Additions < Entities::BaseEntity
5
+ client_service Clients::Games::Additions
6
+
7
+ attr_entity :id, :slug, :name, :released, :tba, :background_image, :rating, :rating_top, :ratings,
8
+ :ratings_count, :reviews_text_count, :added, :added_by_status, :metacritic,
9
+ :playtime, :suggestions_count
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,20 @@
1
+ module RawgApi
2
+ module Entities
3
+ class Game
4
+ class Details < BaseEntity
5
+ client_service Clients::Games::Details
6
+
7
+ attr_entity :id, :slug, :name, :name_original, :description, :metacritic, :released, :tba,
8
+ :updated, :background_image, :background_image_additional, :website, :rating,
9
+ :rating_top, :ratings, :reactions, :added, :added_by_status, :playtime, :screenshots_count,
10
+ :movies_count, :creators_count, :achievements_count, :parent_achievements_count, :reddit_url,
11
+ :reddit_name, :reddit_description, :reddit_logo, :reddit_count, :twitch_count, :youtube_count,
12
+ :reviews_text_count, :ratings_count, :suggestions_count, :alternative_names, :metacritic_url,
13
+ :parents_count, :additions_count, :game_series_count, :user_game, :reviews_count, :saturated_color,
14
+ :dominant_color, :parent_platforms, :platforms, :stores, :developers, :genres, :tags, :publishers,
15
+ :esrb_rating, :clip, :description_raw
16
+
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,11 @@
1
+ module RawgApi
2
+ module Entities
3
+ class Game
4
+ class DevelopmentTeam < Entities::BaseEntity
5
+ client_service Clients::Games::DevelopmentTeam
6
+
7
+ attr_entity :id, :name, :slug, :image, :image_background, :games_count
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,25 @@
1
+ module RawgApi
2
+ module Entities
3
+ class Game
4
+ class Entity < BaseEntity
5
+
6
+ delegate_method Game::Additions, :find_additions, :find
7
+ delegate_method Game::YouTube, :find_youtube, :find
8
+ delegate_method Game::Twitch, :find_twitch, :find
9
+ delegate_method Game::SuggestedGames, :find_suggested_games, :find
10
+ delegate_method Game::Series, :find_series, :find
11
+ delegate_method Game::Screenshots, :find_screenshots, :find
12
+ delegate_method Game::Stores, :find_stores, :find
13
+ delegate_method Game::Reddit, :find_reddit, :find
14
+ delegate_method Game::Details, :find, :find
15
+
16
+ client_service Clients::Games
17
+
18
+ attr_entity :id, :slug, :name, :released, :tba, :background_image, :rating, :rating_top,
19
+ :ratings, :ratings_count, :reviews_text_count, :added, :added_by_status,
20
+ :metacritic, :playtime, :suggestions_count
21
+
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,13 @@
1
+ module RawgApi
2
+ module Entities
3
+ class Game
4
+ class ParentGames < Entities::BaseEntity
5
+ client_service Clients::Games::ParentGames
6
+
7
+ attr_entity :id, :slug, :name, :released, :tba, :background_image, :rating, :rating_top, :ratings,
8
+ :ratings_count, :reviews_text_count, :added, :added_by_status,
9
+ :metacritic, :playtime, :suggestions_count
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,11 @@
1
+ module RawgApi
2
+ module Entities
3
+ class Game
4
+ class Reddit < Entities::BaseEntity
5
+ client_service Clients::Games::Reddit
6
+
7
+ attr_entity :id, :name, :text, :image, :url, :username, :username_url, :created
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ module RawgApi
2
+ module Entities
3
+ class Game
4
+ class Screenshots < Entities::BaseEntity
5
+ client_service Clients::Games::Screenshots
6
+
7
+ attr_entity :image
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,13 @@
1
+ module RawgApi
2
+ module Entities
3
+ class Game
4
+ class Series < Entities::BaseEntity
5
+ client_service Clients::Games::Series
6
+
7
+ attr_entity :id, :slug, :name, :released, :tba, :background_image, :rating, :rating_top,
8
+ :ratings, :ratings_count, :reviews_text_count, :added, :added_by_status,
9
+ :metacritic, :playtime, :suggestions_count
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,11 @@
1
+ module RawgApi
2
+ module Entities
3
+ class Game
4
+ class Stores < Entities::BaseEntity
5
+ client_service Clients::Games::Stores
6
+
7
+ attr_entity :id, :game_id, :store_id, :url
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ module RawgApi
2
+ module Entities
3
+ class Game
4
+ class SuggestedGames < Entities::BaseEntity
5
+ client_service Clients::Games::SuggestedGames
6
+
7
+ attr_entity :id
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ module RawgApi
2
+ module Entities
3
+ class Game
4
+ class Trailers < Entities::BaseEntity
5
+ client_service Clients::Games::Trailers
6
+
7
+ attr_entity :id, :name, :preview, :data
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,12 @@
1
+ module RawgApi
2
+ module Entities
3
+ class Game
4
+ class Twitch < Entities::BaseEntity
5
+ client_service Clients::Games::Twitch
6
+
7
+ attr_entity :id, :external_id, :name, :description, :created,
8
+ :published, :thumbnail, :view_count, :language
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,13 @@
1
+ module RawgApi
2
+ module Entities
3
+ class Game
4
+ class YouTube < Entities::BaseEntity
5
+ client_service Clients::Games::Youtube
6
+
7
+ attr_entity :id, :external_id, :channel_id, :channel_title, :name, :description,
8
+ :created, :view_count, :comments_count, :like_count, :dislike_count,
9
+ :favorite_count, :thumbnails
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,9 @@
1
+ module RawgApi
2
+ module Entities
3
+ class Genres < BaseEntity
4
+ client_service Clients::Genres
5
+
6
+ attr_entity :id, :name, :slug, :games_count, :image_background
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module RawgApi
2
+ module Entities
3
+ class ParentPlatform < BaseEntity
4
+ client_service Clients::ParentPlatforms
5
+
6
+ attr_entity :id, :name, :slug, :games_count, :image_background, :image, :year_start, :year_end, :platforms
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module RawgApi
2
+ module Entities
3
+ class Platform < BaseEntity
4
+ client_service Clients::Platforms
5
+
6
+ attr_entity :id, :name, :slug, :games_count, :image_background, :image, :year_start, :year_end
7
+ end
8
+ end
9
+ end