Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mottox2/esa-node
esa.io client for nodejs
https://github.com/mottox2/esa-node
esa esa-io
Last synced: 14 days ago
JSON representation
esa.io client for nodejs
- Host: GitHub
- URL: https://github.com/mottox2/esa-node
- Owner: mottox2
- Created: 2018-07-26T00:27:31.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-02-22T16:02:28.000Z (almost 6 years ago)
- Last Synced: 2025-01-01T18:12:48.605Z (17 days ago)
- Topics: esa, esa-io
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/esa-node
- Size: 42 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## esa-node
[![npm version](https://badge.fury.io/js/esa-node.svg)](https://badge.fury.io/js/esa-node)
esa.io API v1 client library for nodejs.
## Installation
via npm
```
$ npm install --save esa-node
```via yarn
```
$ yarn add esa-node
```## Supported methods
- teams
- team
- members
- posts
- post(post_number)
- create_post
- comments
- comment
- invitation
- user## Example
```js
// Setup
import Esa from 'esa-node'
const esa = new Esa('access_token', 'teamName')// Fetch posts
const res = await esa.posts()
console.log(res.posts)// Change team
const teamResponse = await esa.teams()
esa.setTeam(teamResponse.teams[1].name)
const posts = esa.posts()
```## Contributing
1. Fork it ( https://github.com/mottox2/esa-node/fork )
2. Create your feature branch (git checkout -b my-new-feature)
3. Commit your changes (git commit -am 'Add some feature')
4. Push to the branch (git push origin my-new-feature)
5. Create a new Pull Request## Links
- [dev/esa/api/v1 docs.esa.io](https://docs.esa.io/posts/102)