Skip to content
A simply Misskey library for Node.js (1.0 beta now)
Branch: master
Clone or download
Latest commit 55047e6 May 10, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src rename method May 10, 2019
.gitignore update beta May 10, 2019
LICENSE Initial commit May 10, 2019
README.md rename method May 10, 2019
package.json v1.0.0-beta.4 May 10, 2019
tsconfig.json v1.0.0-beta.2 May 10, 2019

README.md

corekey

A simply Misskey library for Node.js

Installation

npm i corekey

Usage

1. Import the corekey library

You need to import classes you want to use.

import {
	App,
	AuthSession
} from 'corekey';

2. Create a Misskey App

You can create an Misskey App in App.create static method.

const app = await App.create('misskey.io', 'example app', 'generated by corekey', ['write:notes']);

3. Start a session of the app authorization

Let's get your account instance!

const session = await AuthSession.generate(app);
console.log('open in your browser: ', session.url);

const account = await session.waitForAuth();

4. Access a lot of APIs

For example, Post your notes to the Misskey.

await account.request('notes/create', {
	text: 'corekey test'
});

Note: If you use await, you need to wrap the statement with Async Function.

Enjoy!

License

MIT

You can’t perform that action at this time.