{"id":23003356,"url":"https://github.com/kmagameguy/igdb_client","last_synced_at":"2025-10-09T17:38:01.034Z","repository":{"id":254190165,"uuid":"845773884","full_name":"Kmagameguy/igdb_client","owner":"Kmagameguy","description":"A Ruby client for accessing the Internet Game Database","archived":false,"fork":false,"pushed_at":"2025-07-25T20:35:38.000Z","size":65,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-09T17:37:58.250Z","etag":null,"topics":["ruby","ruby-gem"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kmagameguy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-08-21T22:47:08.000Z","updated_at":"2025-07-25T20:35:34.000Z","dependencies_parsed_at":"2024-08-29T12:54:37.879Z","dependency_job_id":"3661c67b-e673-4cde-84d1-b17fe06636bd","html_url":"https://github.com/Kmagameguy/igdb_client","commit_stats":null,"previous_names":["kmagameguy/igdb_client"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/Kmagameguy/igdb_client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kmagameguy%2Figdb_client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kmagameguy%2Figdb_client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kmagameguy%2Figdb_client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kmagameguy%2Figdb_client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kmagameguy","download_url":"https://codeload.github.com/Kmagameguy/igdb_client/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kmagameguy%2Figdb_client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001868,"owners_count":26083197,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ruby","ruby-gem"],"created_at":"2024-12-15T07:14:00.601Z","updated_at":"2025-10-09T17:38:01.018Z","avatar_url":"https://github.com/Kmagameguy.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Internet Game Database Client\n\nA Ruby client for the [Internet Game Database](https://www.igdb.com/)\n\n## Installation\n\n## Pre-requisites\nSee the [IGDB Getting Started Guide](https://api-docs.igdb.com/#getting-started).  You'll need:\n1. A Twitch account w/2FA\n1. A registered twitch application in the developer portal\n1. A client id for the application\n1. A client secret for the application\n\n### Bundler\n\nAdd the gem to your Gemfile:\n\n```ruby\ngem 'igdb_client', git: 'git@github.com:kmagameguy/igdb_client'\n```\n\nAnd then run:\n\n```bash\nbundle install\n```\n### Setup .ENV\n\nReplace the template values in the provided `.env` file with your own values.  You can also set secrets for different environments with multiple `.env` files.  For example, for a rails app in development mode, use `.env.development.local`.\n\nSee the [dotenv](https://github.com/bkeepers/dotenv) documentation for more details.\n\n### Run Setup Script\nRun `bin/setup` to finish installation.  This script just checks the current environment and performs tasks like installing bundler and the required gems (see `igdb_client.gemspec` and `Gemfile` for more details).\n\n## Usage Instructions\n\nUse the provided `bin/console` script to open a ruby interpreter session with the IGDB Client pre-loaded.  At the simplest level, usage works like this:\n\n```ruby\nclient = IgdbClient::Api.new\nclient.get(:games)\n=\u003e # Returns an array of 10 games, where each game is represented by an OpenStruct object.  ALL available fields are returned.\n```\n\nEach endpoint is represented as a symbol.  To see the available endpoints, run this:\n\n```ruby\nIgdbClient::Api.help\n\n# or\n\nclient = IgdbClient::Api.new\nclient.help\n```\n\nYou can also pass query parameters to the `.get` method:\n\n```ruby\nclient = IgdbClient::Api.new\nclient.get(:games, fields: \"name\")\n=\u003e # Returns 10 games with only their ID and name fields.\n```\n\nPass multiple query parameters with a comma-separated string:\n\n```ruby\nclient = IgdbClient::Api.new\nclient.get(:games, fields: \"name,aggregated_rating,hypes\")\n=\u003e # Returns 10 games with only their ID, name, aggregated_rating, and hypes.\n```\n\nAlternatively you can exclude specific fields with a comma-separated string:\n\n```ruby\nclient = IgdbClient::Api.new\nclient.get(:games, exclude: \"screenshots,websites\")\n=\u003e # Returns 10 games with all fields EXCEPT the 'screenshots' and 'websites' fields\n```\n\nYou can specify expanded attributes for associated fields with dot-notation (`.`):\n```ruby\nclient = IgdbClient::Api.new\nclient.get(:games, fields: \"name, platforms.*\")\n=\u003e # Returns 10 games with only their ID, name, and platforms field, where the platforms response includes ALL platforms data, not just the platform ID\n\nclient.get(:games, fields: \"name, platforms.name\")\n=\u003e # Returns 10 games with only their ID, name, and the ID + Name of each platform the game supports\"\n```\n\nYou can also retrieve information for specific items by passing an `id` value:\n```ruby\nclient = IgdbClient::Api.new\nclient.get(:games, id: 124961)\n=\u003e # Returns the game whose ID matches the one specified.  Includes all available fields.\n```\n\nYou can find multiple items by supplying multiple `id` values in an array:\n```ruby\nclient = IgdbClient::Api.new\nclient.get(:games, id: [124961, 5])\n=\u003e # Returns an array of OpenStructs for each found ID.  If an ID is not found it will simply be skipped.  Includees all available fields.\n\nYou can pass `id` \u0026 `fields` parameters together:\n```ruby\nclient = IgdbClient::Api.new\nclient.get(:games, id: 124961, fields: \"name\" )\n=\u003e # Returns the specified game and only its ID and Name fields.\n```\n\nYou can search for content by passing a `search` value:\n```ruby\nclient = IgdbClient::Api.new\nclient.get(:characters, search: \"Bob\", fields: \"name\")\n```\n\nYou can limit the number of retrieved items with the `limit` value:\n```ruby\nclient = IgdbClient::Api.new\nclient.get(:games, fields: \"name\", limit: 3)\n```\n\nYou can offset the results, too:\n```ruby\nclient = IgdbClient::Api.new\nclient.get(:games, fields: \"name\", limit: 3, offset: 7)\n```\n\nThis example skips over the first 7 results and returns the next 3.\n\nYou can order the results by field and direction:\n```ruby\nclient = IgdbClient::Api.new\nclient.get(:games, limit: 15, search: \"Super\", sort_by: \"aggregated_rating\", sort_direction: :desc)\n```\n\nNote that the `sort_direction` parameter is optional.  When not specified the default sort order is `:asc` (ascending).\n\nThe client accepts advanced filtering as defined by the IGDB API:\n```ruby\nclient = IgdbClient::Api.new\nclient.get(:games, fields: \"name\", filter: \"where rating \u003e= 80\")\n```\n\nSee the [IGDB API Documentation for filters](https://api-docs.igdb.com/#filters) for more information.  The client does not currently perform any validations against the filter query.\n\n### Other Notes\nAs long as you hold a reference to the `IgdbClient::Api` in memory, it will manage authentication concerns w/Twitch automatically.\nThe access token remains in memory until it expires at which point any subsequent request made through the client will silently reauthenticate and process the request.\n\n## Development\nContributions are welcome.  To get started with development:\n1. Fork this repository.\n1. Complete the setup steps above.\n1. Make a pull request when you're ready to propose changes.\n1. Include test coverage for your changes.  You can run `bin/test` to run the test suite.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkmagameguy%2Figdb_client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkmagameguy%2Figdb_client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkmagameguy%2Figdb_client/lists"}