igdb2 0.8.0
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.
- checksums.yaml +7 -0
- data/README.md +86 -0
- data/lib/igdb.rb +91 -0
- data/lib/igdb/configuration/api.rb +30 -0
- data/lib/igdb/exceptions.rb +13 -0
- data/lib/igdb/models/alternative_name.rb +5 -0
- data/lib/igdb/models/api_resource.rb +67 -0
- data/lib/igdb/models/character.rb +6 -0
- data/lib/igdb/models/collection.rb +6 -0
- data/lib/igdb/models/company.rb +6 -0
- data/lib/igdb/models/credits.rb +6 -0
- data/lib/igdb/models/esrb.rb +5 -0
- data/lib/igdb/models/external.rb +5 -0
- data/lib/igdb/models/feature.rb +5 -0
- data/lib/igdb/models/feature_value.rb +5 -0
- data/lib/igdb/models/feed.rb +6 -0
- data/lib/igdb/models/franchise.rb +6 -0
- data/lib/igdb/models/game.rb +6 -0
- data/lib/igdb/models/game_engine.rb +6 -0
- data/lib/igdb/models/game_mode.rb +6 -0
- data/lib/igdb/models/genre.rb +6 -0
- data/lib/igdb/models/image.rb +5 -0
- data/lib/igdb/models/keyword.rb +6 -0
- data/lib/igdb/models/page.rb +6 -0
- data/lib/igdb/models/pegi.rb +5 -0
- data/lib/igdb/models/person.rb +6 -0
- data/lib/igdb/models/platform.rb +6 -0
- data/lib/igdb/models/platform_company.rb +5 -0
- data/lib/igdb/models/platform_version.rb +5 -0
- data/lib/igdb/models/platform_version_release_date.rb +5 -0
- data/lib/igdb/models/player_perspective.rb +6 -0
- data/lib/igdb/models/pulse.rb +6 -0
- data/lib/igdb/models/pulse_group.rb +6 -0
- data/lib/igdb/models/pulse_source.rb +6 -0
- data/lib/igdb/models/release_date.rb +6 -0
- data/lib/igdb/models/review.rb +6 -0
- data/lib/igdb/models/theme.rb +6 -0
- data/lib/igdb/models/time_to_beat.rb +5 -0
- data/lib/igdb/models/title.rb +6 -0
- data/lib/igdb/models/version.rb +6 -0
- data/lib/igdb/models/video.rb +6 -0
- data/lib/igdb/models/website.rb +5 -0
- data/lib/igdb/representers/alternative_name_representer.rb +10 -0
- data/lib/igdb/representers/character_representer.rb +18 -0
- data/lib/igdb/representers/collection_representer.rb +11 -0
- data/lib/igdb/representers/company_representer.rb +24 -0
- data/lib/igdb/representers/credits_representer.rb +22 -0
- data/lib/igdb/representers/esrb_representer.rb +12 -0
- data/lib/igdb/representers/external_representer.rb +9 -0
- data/lib/igdb/representers/feature_representer.rb +17 -0
- data/lib/igdb/representers/feature_value_representer.rb +12 -0
- data/lib/igdb/representers/feed_representer.rb +16 -0
- data/lib/igdb/representers/franchise_representer.rb +11 -0
- data/lib/igdb/representers/game_engine_representer.rb +15 -0
- data/lib/igdb/representers/game_mode_representer.rb +11 -0
- data/lib/igdb/representers/game_representer.rb +64 -0
- data/lib/igdb/representers/genre_representer.rb +10 -0
- data/lib/igdb/representers/image_representer.rb +14 -0
- data/lib/igdb/representers/keyword_representer.rb +12 -0
- data/lib/igdb/representers/page_representer.rb +38 -0
- data/lib/igdb/representers/pegi_representer.rb +12 -0
- data/lib/igdb/representers/person_representer.rb +15 -0
- data/lib/igdb/representers/platform_company_representer.rb +12 -0
- data/lib/igdb/representers/platform_representer.rb +17 -0
- data/lib/igdb/representers/platform_version_release_date_representer.rb +12 -0
- data/lib/igdb/representers/platform_version_representer.rb +32 -0
- data/lib/igdb/representers/player_perspective_representer.rb +11 -0
- data/lib/igdb/representers/pulse_group_representer.rb +21 -0
- data/lib/igdb/representers/pulse_representer.rb +25 -0
- data/lib/igdb/representers/pulse_source_representer.rb +15 -0
- data/lib/igdb/representers/release_date_representer.rb +21 -0
- data/lib/igdb/representers/representer.rb +14 -0
- data/lib/igdb/representers/review_representer.rb +28 -0
- data/lib/igdb/representers/theme_representer.rb +10 -0
- data/lib/igdb/representers/time_to_beat_representer.rb +13 -0
- data/lib/igdb/representers/title_representer.rb +13 -0
- data/lib/igdb/representers/version_representer.rb +19 -0
- data/lib/igdb/representers/video_representer.rb +10 -0
- data/lib/igdb/representers/website_representer.rb +12 -0
- data/lib/igdb/requester.rb +54 -0
- data/lib/igdb/version.rb +3 -0
- metadata +278 -0
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'ostruct'
|
2
|
+
require 'representable/json'
|
3
|
+
|
4
|
+
# URL path: /characters/
|
5
|
+
# Video game characters
|
6
|
+
module Igdb
|
7
|
+
class CharacterRepresenter < Igdb::Representer
|
8
|
+
collection_representer class: Igdb::Character
|
9
|
+
|
10
|
+
property :mug_shot # See the Image object reference.
|
11
|
+
property :gender # See the Gender value reference.
|
12
|
+
property :species # See the Species value reference.
|
13
|
+
|
14
|
+
collection :akas # Name aliases - ‘also known as'.
|
15
|
+
collection :games # List of games character appears in.
|
16
|
+
collection :people # List of people associated with character.
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'ostruct'
|
2
|
+
require 'representable/json'
|
3
|
+
|
4
|
+
# URL path: /companies/
|
5
|
+
# Video game companies. Both publishers & developers
|
6
|
+
module Igdb
|
7
|
+
class CompanyRepresenter < Igdb::Representer
|
8
|
+
collection_representer class: Igdb::Company
|
9
|
+
|
10
|
+
property :logo
|
11
|
+
property :description
|
12
|
+
property :country
|
13
|
+
property :website
|
14
|
+
property :start_date
|
15
|
+
property :start_date_category
|
16
|
+
property :changed_company_id
|
17
|
+
property :change_date
|
18
|
+
property :change_date_category
|
19
|
+
property :twitter # The URL of the Twitter profile
|
20
|
+
|
21
|
+
collection :published
|
22
|
+
collection :developed
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'representable/json'
|
2
|
+
|
3
|
+
# URL path: /credits/
|
4
|
+
# Contains all employees responsible for working on the game.
|
5
|
+
module Igdb
|
6
|
+
class CreditsRepresenter < Igdb::Representer
|
7
|
+
collection_representer class: Igdb::Credits
|
8
|
+
|
9
|
+
property :game
|
10
|
+
property :category
|
11
|
+
property :company
|
12
|
+
property :position # Position in the credits list.
|
13
|
+
property :person
|
14
|
+
property :character
|
15
|
+
property :person_title
|
16
|
+
property :country
|
17
|
+
# Credited name of the person only for overriding when misspelled or changed in credits.
|
18
|
+
property :credited_name
|
19
|
+
# Credited name of the character only for overriding when misspelled or changed in credits.
|
20
|
+
property :character_credited_name
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'representable/json'
|
2
|
+
|
3
|
+
module Igdb
|
4
|
+
class EsrbRepresenter < Representable::Decorator
|
5
|
+
include Representable::JSON
|
6
|
+
|
7
|
+
collection_representer class: Igdb::Esrb
|
8
|
+
|
9
|
+
property :rating # See the ESRB rating value reference
|
10
|
+
property :synopsis
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'representable/json'
|
2
|
+
|
3
|
+
module Igdb
|
4
|
+
class FeatureRepresenter < Representable::Decorator
|
5
|
+
include Representable::JSON
|
6
|
+
|
7
|
+
collection_representer class: Igdb::Feature
|
8
|
+
|
9
|
+
property :title # Title of the feature
|
10
|
+
property :description # Description of the feature
|
11
|
+
property :category # Feature category
|
12
|
+
property :position # Show at this index
|
13
|
+
|
14
|
+
collection :values, extend: Igdb::FeatureValueRepresenter,
|
15
|
+
class: Igdb::FeatureValue
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'representable/json'
|
2
|
+
|
3
|
+
module Igdb
|
4
|
+
class FeatureValueRepresenter < Representable::Decorator
|
5
|
+
include Representable::JSON
|
6
|
+
|
7
|
+
collection_representer class: Igdb::Feature
|
8
|
+
|
9
|
+
property :game # ID of the Edition
|
10
|
+
property :value # Feature's value
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'representable/json'
|
2
|
+
|
3
|
+
# URL path: /feeds/
|
4
|
+
# Feed items are a social feed of status updates, media and news articles.
|
5
|
+
module Igdb
|
6
|
+
class FeedRepresenter < Igdb::Representer
|
7
|
+
collection_representer class: Igdb::Feed
|
8
|
+
|
9
|
+
property :content
|
10
|
+
property :category
|
11
|
+
property :user
|
12
|
+
property :games
|
13
|
+
property :title
|
14
|
+
property :feed_likes_count
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'representable/json'
|
2
|
+
|
3
|
+
# URL path: /franchises/
|
4
|
+
# A list of video game franchises such as Star Wars.
|
5
|
+
module Igdb
|
6
|
+
class FranchiseRepresenter < Igdb::Representer
|
7
|
+
collection_representer class: Igdb::Franchise
|
8
|
+
|
9
|
+
collection :games
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'representable/json'
|
2
|
+
|
3
|
+
# URL path: /game_engines/
|
4
|
+
# Video game engines such as unreal engine.
|
5
|
+
module Igdb
|
6
|
+
class GameEngineRepresenter < Igdb::Representer
|
7
|
+
collection_representer class: Igdb::GameEngine
|
8
|
+
|
9
|
+
property :logo
|
10
|
+
|
11
|
+
collection :games
|
12
|
+
collection :companies
|
13
|
+
collection :platforms
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
require 'ostruct'
|
2
|
+
require 'representable/hash'
|
3
|
+
|
4
|
+
# URL path: /games/
|
5
|
+
# Video Games!
|
6
|
+
module Igdb
|
7
|
+
class GameRepresenter < Igdb::Representer
|
8
|
+
collection_representer class: Igdb::Game
|
9
|
+
|
10
|
+
property :summary # Summary of the game.
|
11
|
+
property :storyline # Plot of the game.
|
12
|
+
property :collection # Collection (aka series) the game belongs to.
|
13
|
+
property :franchise # ID of a Franchise record.
|
14
|
+
property :hypes # Number of follows a game gets before release.
|
15
|
+
property :popularity # A number based on traffic to that game page.
|
16
|
+
property :rating # Average user rating.
|
17
|
+
property :rating_count # Number of user ratings.
|
18
|
+
property :aggregated_rating # Rating based on external critic scores.
|
19
|
+
property :aggregated_rating_count # Number of external critic scores.
|
20
|
+
property :total_rating # Average rating based on both IGDB user and external critic scores.
|
21
|
+
property :total_rating_count # Total number of user and external critic scores.
|
22
|
+
property :game # ID of a Game this game is a DLC/expansion of (expandable).
|
23
|
+
property :version_parent # ID of a Game this game is an edition of.
|
24
|
+
property :category # See the Game category value reference.
|
25
|
+
property :first_release_date # Initial release date of the game.
|
26
|
+
property :status # Release status, e.g. released, alpha, beta, etc.
|
27
|
+
|
28
|
+
property :time_to_beat, extend: Igdb::TimeToBeatRepresenter, # See the Time to beat object reference.
|
29
|
+
class: Igdb::TimeToBeat
|
30
|
+
property :cover, extend: Igdb::ImageRepresenter, # Cover image.
|
31
|
+
class: Igdb::Image
|
32
|
+
property :esrb, extend: Igdb::EsrbRepresenter, # ESRB rating.
|
33
|
+
class: Igdb::Esrb
|
34
|
+
property :pegi, extend: Igdb::PegiRepresenter, # PEGI rating.
|
35
|
+
class: Igdb::Pegi
|
36
|
+
property :external, extend: Igdb::ExternalRepresenter,
|
37
|
+
class: Igdb::External
|
38
|
+
|
39
|
+
collection :developers
|
40
|
+
collection :publishers
|
41
|
+
collection :game_engines
|
42
|
+
collection :player_perspectives
|
43
|
+
collection :game_modes
|
44
|
+
collection :keywords
|
45
|
+
collection :themes
|
46
|
+
collection :genres
|
47
|
+
collection :screenshots
|
48
|
+
collection :tags
|
49
|
+
collection :games
|
50
|
+
collection :dlcs
|
51
|
+
collection :expansions
|
52
|
+
collection :standalone_expansions
|
53
|
+
collection :bundles
|
54
|
+
|
55
|
+
collection :release_dates, extend: Igdb::ReleaseDateRepresenter,
|
56
|
+
class: Igdb::ReleaseDate
|
57
|
+
collection :alternative_names, extend: Igdb::AlternativeNameRepresenter,
|
58
|
+
class: Igdb::AlternativeName
|
59
|
+
collection :videos, extend: Igdb::VideoRepresenter,
|
60
|
+
class: Igdb::Video
|
61
|
+
collection :websites, extend: Igdb::WebsiteRepresenter,
|
62
|
+
class: Igdb::Website
|
63
|
+
end
|
64
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'representable/json'
|
2
|
+
|
3
|
+
module Igdb
|
4
|
+
class ImageRepresenter < Representable::Decorator
|
5
|
+
include Representable::JSON
|
6
|
+
|
7
|
+
collection_representer class: Igdb::Image
|
8
|
+
|
9
|
+
property :url # Can be non-IGDB URL
|
10
|
+
property :cloudinary_id # Cloudinary slug
|
11
|
+
property :width # The image's width in pixels
|
12
|
+
property :height # The image's height in pixels
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# URL path: /keywords/
|
2
|
+
require 'representable/json'
|
3
|
+
|
4
|
+
# URL path: /keywords/
|
5
|
+
# Keywords are words or phrases that get tagged to a game such as "world war 2" or "steampunk".
|
6
|
+
module Igdb
|
7
|
+
class KeywordRepresenter < Igdb::Representer
|
8
|
+
collection_representer class: Igdb::Keyword
|
9
|
+
|
10
|
+
collection :games
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require 'representable/json'
|
2
|
+
|
3
|
+
# URL path: /pages/
|
4
|
+
# Our multipurpose page system is currently used for youtubers and media organisations.
|
5
|
+
module Igdb
|
6
|
+
class PageRepresenter < Igdb::Representer
|
7
|
+
collection_representer class: Igdb::Page
|
8
|
+
|
9
|
+
property :content
|
10
|
+
property :category
|
11
|
+
property :sub_category
|
12
|
+
property :country
|
13
|
+
property :color
|
14
|
+
property :user
|
15
|
+
property :description
|
16
|
+
property :page_follows_count
|
17
|
+
property :logo
|
18
|
+
property :background
|
19
|
+
property :facebook
|
20
|
+
property :twitter
|
21
|
+
property :twitch
|
22
|
+
property :instagram
|
23
|
+
property :youtube
|
24
|
+
property :steam
|
25
|
+
property :linkedin
|
26
|
+
property :pinterest
|
27
|
+
property :soundcloud
|
28
|
+
property :google_plus
|
29
|
+
property :reddit
|
30
|
+
property :battlenet
|
31
|
+
property :origin
|
32
|
+
property :uplay
|
33
|
+
property :discord
|
34
|
+
|
35
|
+
collection :game
|
36
|
+
collection :company
|
37
|
+
end
|
38
|
+
end
|