Skip to content

Commit

Permalink
Update readme.md
Browse files Browse the repository at this point in the history
getGameById and getGameByName added
  • Loading branch information
grkndev authored Nov 11, 2023
1 parent 2c24702 commit 23db26a
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,72 @@ console.log(clip)
}
```

## getGameByName(game_name)
> Paramaters
- game_name(string): Twitch game name

> Response
- Game Data

### Example Usage
```js
import Twitcher from "twitcher"
let client = new Twitcher({
token:"YOUR TOKEN",
client_id:"YOUR CLIENT ID",
})
let game = await client.getGameByName("Fortnite")
console.log(game)
```

### Example Response
```js
{
success: true,
data: [
{
id: '33214',
name: 'Fortnite',
box_art_url: 'https://static-cdn.jtvnw.net/ttv-boxart/33214-{width}x{height}.jpg',
igdb_id: '1905'
}
]
}
```

## getGameById(game_id)
> Paramaters
- game_id(Number): Twitch game id

> Response
- Game Data

### Example Usage
```js
import Twitcher from "twitcher"
let client = new Twitcher({
token:"YOUR TOKEN",
client_id:"YOUR CLIENT ID",
})
let game = await client.getGameById("509658")
console.log(game)
```

### Example Response
```js
{
success: true,
data: [
{
id: '509658',
name: 'Just Chatting',
box_art_url: 'https://static-cdn.jtvnw.net/ttv-boxart/509658-{width}x{height}.jpg',
igdb_id: ''
}
]
}
```

## searchChannel(query)
> Paramaters
- query: Twitch channel name
Expand Down

0 comments on commit 23db26a

Please sign in to comment.