8000 GitHub - wilg/igdb_client: Ruby client interface for IGDB API
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

wilg/igdb_client

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

igdb_client

Ruby client interface for IGDB API. Supports API v4.

Installation

$ gem install igdb_client

Usage

The structure of queries and results matches the api documentaion. You will need client id and a client secret to access the API. The above link explains how to acquire them.

Please note, that unlike the previous versions, this client takes a client secret rather than access token. The client will retrieve the required access token and renew it whenever it expires.

Instance
require 'igdb_client'

# initialize with client id and token
client = IGDB::Client.new("client_id","client_secret")

# pass endpoint and fields
client.get "games", {fields: "name", limit: 10}

# Use search method to search
client.search("ibb and obb", {fields: "name,release_dates,rating"})

# Use id if you want to match by id
client.id 1942

# Access retrieved data by using methods matching fields of data
results = client.platform.id 2
results[0].name
results[0].summary

About

Ruby client interface for IGDB API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%
0