https://github.com/darkstego/igdb_crystal
IGDB interface for Crystal
https://github.com/darkstego/igdb_crystal
api crystal igdb
Last synced: 5 months ago
JSON representation
IGDB interface for Crystal
- Host: GitHub
- URL: https://github.com/darkstego/igdb_crystal
- Owner: darkstego
- License: mit
- Created: 2021-11-16T18:13:07.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-11-16T18:19:04.000Z (over 4 years ago)
- Last Synced: 2025-07-31T00:29:02.887Z (8 months ago)
- Topics: api, crystal, igdb
- Language: Crystal
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# IGDB
Crystal wrapper for the [IGDB](https://www.igdb.com/)
## Installation
1. Add the dependency to your `shard.yml`:
```yaml
dependencies:
igdb:
github: darkstego/igdb_crystal
```
2. Run `shards install`
## Usage
```crystal
require "igdb"
client = IGDB.new("my_id","my_token")
# Search for comming soon PS4 games
client.get {"fields" => "*",
"where" => "game.platforms = 48 * date < 1538129354",
"sort" => "date desc"}
# Search for 'Mario Kart' games
client.search "Mario Kart"
# Temprarily switch endpoint
client.characters.id 55 #finds character with id 55
client.id 55 #finds game with id 55
# Permanently switch endpoint
client.endpoint = "characters"
# Count Matches
client.count
```
## Contributing
1. Fork it ()
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request
## Contributors
- [Abdulla Bubshait](https://github.com/darkstego) - creator and maintainer