Getting Started Edit
Welcome to our API.
Base URL
https://twitch.spkfox.de/
You’ll succeed if you do this.
Here’s some useful information.
Something may not happen if you try and do this.
Something bad will happen if you do this.
Authentication Edit
For now there is no authentication required. This might change in the future.
Errors Edit
| Code | Name | Description |
|---|---|---|
| 200 | OK | Success |
| 201 | Created | Creation Successful |
| 400 | Bad Request | We could not process that action |
| 401 | Unauthenticated | Missing API KEY |
| 403 | Forbidden | We couldn’t authenticate you |
| 405 | Method Not Allowed | You used an unsupported Method. |
| 406 | Not Acceptable | Missing or unsuported MIME-type requested. |
| 422 | Unprocessable Content | Syntax correct but there is still something wrong in your request. |
All errors will return JSON in the following format or as Plain Text.
{
"ERROR": true,
"status": 400,
"message": 'error message here'
}
/schedule/:channel Edit
Fetch Twitch Schedule
Parameters
- :channel `(required)`
- Twitch Username or User ID.
- accept `(optional)`
- Overrides the values of the `Accept` header and is required if the `Accept` header is absent or it will return a 406 error status code. Allowed Values: - json - png - webp - plain - jpg - gif
- time `(optional)`
- A valid Unix Timestamp of the week the schedule should be fetched. For schedules older than 3 weeks a 422 error status code will be returned if the schedule is not archived by us.
- timezone `(optional)`
- A valid timezone (ex.: `Europe/Berlin`). If absent or invalid will be set to `GMT`
- height `(optional)`
- To set a custom height for the returned image. If `width` is absent it will keep the ratio.
- width `(optional)`
- To set a custom width for the returned image. If `height` is absent it will keep the ratio.
Fetches the requested Twitch schedule of the given :channel
let channel = "YOUR_CHANNEL_NAME_OR_ID";
let height = 1080;
let width = 1920;
let time = currentDate.getTime();
let timezone = "GMT";
let url = "https://twitch.spkfox.de/channel/schedule/" + channel;
$.ajax({
url: url,
type: "get",
headers: {
Accept: "image/webp, image/jpg;q=0.9, image/apng;q=0.8, image/gif;q=0.7, image/*;q=0.6, application/json;q=0.5, text/plain;q=0.4, */*;q=0.1"
},
data: {
height: height,
width: width,
time: time,
timezone: timezone
},
success: function(response) {
// Do something.
},
error: function(xhr) {
// Error Handling.
}
});
channel = "YOUR_CHANNEL_NAME_OR_ID"
height = 1080
width = 1920
time = time.time()
timezone = "GMT"
url = 'https://twitch.spkfox.de/channel/schedule/' + channel + '?height=' + height + '&width=' + width + '&time=' + time + '&timezone=' + timezone
headers = {'accept': 'image/webp, image/jpg;q=0.9, image/apng;q=0.8, image/gif;q=0.7, image/*;q=0.6, application/json;q=0.5, text/plain;q=0.4, */*;q=0.1'}
r = requests.get(url, headers=headers)
let querystring = require('querystring');
let request = require('request');
let query = {
width: '1920',
height: '1080',
time: currentDate.getTime(),
timezone: 'GMT'
};
let url = "https://twitch.spkfox.de/channel/schedule/" + channel + "?" + querystring.stringify(query);
request({
headers: {
'Accept': 'image/webp, image/jpg;q=0.9, image/apng;q=0.8, image/gif;q=0.7, image/*;q=0.6, application/json;q=0.5, text/plain;q=0.4, */*;q=0.1'
},
uri: url,
method: 'GET'
}, function (err, res, body) {
//it works!
});
curl -XGET -H 'Accept: image/webp, image/jpg;q=0.9, image/apng;q=0.8, image/gif;q=0.7, image/*;q=0.6, application/json;q=0.5, text/plain;q=0.4, */*;q=0.1' 'https://twitch.spkfox.de/channel/schedule/:channel?width=WIDTH&height=HEIGHT&time=TIMESTAMP&timezone=TIMEZONE'
{
"games": [
{
"id": null,
"day": "1",
"img": "https://static.spikey.biz/media/no_stream_80ddd53536f48604a0eee1b2447f2583ff489809b168784457c17b881579dd5f.jpg",
"name": null
},
{
"id": "506456",
"day": "2",
"img": "https://static-cdn.jtvnw.net/ttv-boxart/506456_IGDB-280x373.jpg",
"name": "Satisfactory"
},
{
"id": "506456",
"day": "3",
"img": "https://static-cdn.jtvnw.net/ttv-boxart/506456_IGDB-280x373.jpg",
"name": "Satisfactory"
},
{
"id": null,
"day": "4",
"img": "https://static-cdn.jtvnw.net/ttv-static/404_boxart-280x373.jpg",
"name": "none"
},
{
"id": "490537",
"day": "5",
"img": "https://static-cdn.jtvnw.net/ttv-boxart/490537_IGDB-280x373.jpg",
"name": "Layers of Fear"
},
{
"id": "493815",
"day": "6",
"img": "https://static-cdn.jtvnw.net/ttv-boxart/493815_IGDB-280x373.jpg",
"name": "Oxygen Not Included"
},
{
"id": null,
"day": "7",
"img": "https://static.spikey.biz/media/no_stream_80ddd53536f48604a0eee1b2447f2583ff489809b168784457c17b881579dd5f.jpg",
"name": null
}
],
"images": {
"0": {
"image": null,
"thumb": null,
"medium": null
},
"1": {
"image": null,
"thumb": null,
"medium": null
},
"2": {
"image": null,
"thumb": null,
"medium": null
},
"3": {
"image": null,
"thumb": null,
"medium": null
},
"gif": {
"image": "https://iili.io/Hb3XuuR.gif",
"thumb": "https://iili.io/Hb3XuuR.th.gif",
"medium": "https://iili.io/Hb3XuuR.md.gif"
},
"jpg": {
"image": "https://iili.io/Hb3Xz8J.jpg",
"thumb": "https://iili.io/Hb3Xz8J.th.jpg",
"medium": "https://iili.io/Hb3Xz8J.md.jpg"
},
"png": {
"image": "https://iili.io/Hb3XIyv.png",
"thumb": "https://iili.io/Hb3XIyv.th.png",
"medium": "https://iili.io/Hb3XIyv.md.png"
},
"webp": {
"image": "https://iili.io/Hb3XAjp.webp",
"thumb": "https://iili.io/Hb3XAjp.th.webp",
"medium": "https://iili.io/Hb3XAjp.md.webp"
}
}
}
{
"error": true,
"success": false,
"status": 422
"message": "Cannot be processed because requested time period is too old and not archived."
}
{
"ERROR": true,
"status": 405,
"message": "POST IS NOT AN ACCEPTED METHOD!\nUSE \"GET\",\"OPTIONS\" OR \"HEADER\" INSTEAD."
}
"text/plain" OR "application/json" OR a supported image mime-type MUST BE ACCEPTED TO GET A RESPONSE!
/share Edit
Get Twitter Share Link
Parameters
- twitch
- Twitch Username (REQUIRED)
- game
- The category of your stream.
- Your Twitter Username
- lang
- Set the language of the tweet. Currently supported are "de" for German and "en" for English.
On success it will return a short link (l.spkfox.de/short) which redirects to Twitter and suggests a tweet.
Be aware that the short links do not last forever and you should request a new one each time instead of directly using an old one.
$urlcall(https://twitch.spkfox.de/twitter/share?twitch=$(channel_name)&game=$urlencode($(current_game))&lang=$twitch(broadcaster_language,$(channel_name))&wize=1,1,0)
$(customapi.https://twitch.spkfox.de/twitter/share?twitch=$(channel.display_name)&game=$(queryescape $(game)))
${urlfetch https://twitch.spkfox.de/twitter/share?twitch=${channel.name}}
$(urlfetch https://twitch.spkfox.de/twitter/share?twitch=$(twitch $(channel) "{{displayName}}")&game=$(twitch $(channel) "{{game}}"))
$(customapi https://twitch.spkfox.de/twitter/share?twitch=$(channel.display_name)&game=$(urlencode $(game)))