1.0.1 • Published 2 years ago
amukh1-discord-oauth v1.0.1
amukh1-discord-oauth
Making discord oauth easier.
Prerequisites
This project requires NodeJS (version 8 or later) and NPM. Node and NPM are really easy to install. To make sure you have them available on your machine, try running the following command.
$ npm -v && node -v
6.4.1
v8.16.0
Getting Started
Installation
BEFORE YOU INSTALL: please read the prerequisites
To install and set up the library, run:
$ npm install amukh1-discord-oauth
Or if you prefer using Yarn:
$ yarn add --dev amukh1-discord-oauth
Usage
First, Start by importing the library
var oauth = require('amukh1-discord-oauth');
Functions
getToken
oauth.getToken({
client_id: '123',
client_secret: '123',
code: '123',
redirect_uri: 'https://123.456'
}).then(data => {
console.log(data)
})
getUser
oauth.getUser({
access_token: "123"
}).then(data => {
console.log(data)
})
Serving the app
$ npm start
Contributing
You can contribute to the project by making a pull request on GitHub.
Credits
Amukh1.
Built With
Authors
- Amukh1 - Github
See also the list of contributors who participated in this project.
License
MIT License © Amukh1