kick-sdk
Version:
NodeJS lightweight SDK for Kick.com API.
14 lines (13 loc) • 381 B
JavaScript
const BASE_URL = 'https://api.kick.com';
export const api = async (url, token, options = {}) => {
const headers = {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`,
...options.headers,
};
const response = await fetch(`${BASE_URL}${url}`, {
...options,
headers,
});
return await response.json();
};