0.1.1 • Published 7 years ago

smilodon v0.1.1

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

Smilodon

Smilodon is a Javascript library for Mastodon's API.

This project is really new and few functionalities are present, but the structure is here.

Getting Started

Prerequisites

This library needs to be connected to a running instance of Mastodon (https://mastodon.social for example). The API does not allow to create a new user so you need to create one on the default interface before use the library.

Installing

Using NPM:

npm install smilodon

Using GitHub (last version):

git clone https://github.com/5ika/smilodon
yarn install
yarn build

How to use it

import Smilodon from 'smilodon';
const smilodon = new Smilodon('MyAppName');

smilodon.register('https://mastodon.social');
smilodon.authorize('myEmail', 'myPassword');
const API = smilodon.api();

API.getUserCredentials()
	.then((myCreds) => console.log({myCreds}))
	.catch((error) => console.error(error));

Running the tests

First, add user credentials in the test.js file. Then, you can run tests with Mocha:

yarn test

Contributing

The project is really young, everyone is invited to contribute.

For the moment, we need to add support for every endpoints of the Mastodon API.

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

0.1.1

7 years ago

0.1.0

7 years ago