download
raw
867 Bytes
import { OAuth2Client } from "../client.js";
const authorizationEndpoint = "https://www.bungie.net/en/oauth/authorize";
const tokenEndpoint = "https://www.bungie.net/platform/app/oauth/token";
export class Bungie {
client;
constructor(clientId, clientSecret, redirectURI) {
this.client = new OAuth2Client(clientId, clientSecret, redirectURI);
}
createAuthorizationURL(state, scopes) {
const url = this.client.createAuthorizationURL(authorizationEndpoint, state, scopes);
return url;
}
async validateAuthorizationCode(code) {
const tokens = await this.client.validateAuthorizationCode(tokenEndpoint, code, null);
return tokens;
}
async refreshAccessToken(refreshToken) {
const tokens = await this.client.refreshAccessToken(tokenEndpoint, refreshToken, []);
return tokens;
}
}

Xet Storage Details

Size:
867 Bytes
·
Xet hash:
0a35537a19fb7b9d1a18b2de850e0c9f8fae849e464b730b2a80d2c4d41a0f95

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.