madon
madon copied to clipboard
How to instantiate a client with access token?
In other libraries there is a method to instantiate a client with an access token and an endpoint url, like this one from masto.js:
import { createRestAPIClient } from "masto";
const masto = createRestAPIClient({
url: process.env.URL,
accessToken: process.env.TOKEN,
});
or megalodon-rs (rust):
let client = megalodon::generator(
megalodon::SNS::Mastodon,
String::from("https://fedibird.com"),
Some(String::from("your access token")),
None,
);
Is there an equal method to instantiate a client?