access token from OAuth2 authorization
hostname or base URL
DELETE request to mastodon REST API
relative path from ${baseUrl}/api/v1/ or absolute path
GET request to mastodon REST API
relative path from ${baseUrl}/api/v1/ or absolute path
Query parameters
PATCH request to mastodon REST API
relative path from ${baseUrl}/api/v1/ or absolute path
Form data
POST request to mastodon REST API
relative path from ${baseUrl}/api/v1/ or absolute path
Form data
receive Server-sent Events from Mastodon Streaming API
relative path from ${baseUrl}/api/v1/streaming/ or absolute path 'public', 'public/local', 'user' and 'hashtag?tag=${tag}' are available.
interval of reconnect
streamListener, which inherits from EventEmitter and has event, 'update', 'notification', 'delete', and so on.
Create an application
First, POST /api/v1/apps
your application's name
Form Data
target of base URL
Fetch OAuth access token
will be generated by #createApp or #registerApp
will be generated by #createApp or #registerApp
will be generated by the link of #generateAuthUrl or #registerApp
must be the same uri as the time when you register your OAuth application
base URL of the target
generate authorization url
your OAuth app's client ID
as property, redirect_uri and scope are available, and must be the same as when you register your app
base URL of the target
unauthorized GET request to mastodon REST API
relative path from ${baseUrl}/api/v1/ or absolute path
Query parameters
base URL of the target
Wrapper for personal OAuth Application (createApp and generateAuthUrl)
First, POST /api/v1/apps only client_name is required, so others are optional. Secound, generate an authorization url. finally, return promise of OAuth.AppData instance, which has client_id, client_secret, url, and so on.
Form Data, which is sent to /api/v1/apps
Form Data, which is sent to /api/v1/apps. and properties should be snake_case
base URL of the target
Generated using TypeDoc
for Mastodon API
using superagent for request, you will handle promises