npm i schoologyapi// CommonJS
const SchoologyAPI = require("schoologyapi")
// ES Module
import SchoologyAPI from "schoologyapi"Get API credentials from https://{district}.schoology.com/api
const client = new SchoologyAPI("key", "string")request(method, uri, accessToken?, body?)
method: HTTP Verb (GET, POST, PUT, DELETE).
uri: Schoology API endpoint uri, already prefixed with /v1.
[Optional] accessToken: Access token for three-legged OAuth, taken in the shape of { key: string, secret: string }.
[Optional] body: JSON body for Schoology API Call (Not allowed for GET requests).
await client.request("GET", "/users/13225459")Takes in an OAuth token string oauth_token=abcdef&oauth_token_secret=ghijkl, returns { key: "abcdef", secret: "ghijkl" }.
const token = "oauth_token=abcdef&oauth_token_secret=ghijkl"
const { key, secret } = client.format(token)
console.log(key, secret)
abcdef ghijkl
(Optional)