# gyazo-api

> API Client for Gyazo.com

Latest version **0.3.1** (published 2016-10-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install gyazo-api
pnpm add gyazo-api
yarn add gyazo-api
bun add gyazo-api
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.1 |
| Published | 2016-10-17 |
| First published | 2014-10-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 18 |
| Author | Sho Hashimoto |
| Maintainers | shokai |
| Keywords | gyazo, image, upload |

## Links

- npm: https://www.npmjs.com/package/gyazo-api
- Repository: https://github.com/shokai/node-gyazo-api
- Issues: https://github.com/shokai/node-gyazo-api/issues
- npm.io page: https://npm.io/package/gyazo-api

## Dependencies (1)

- [request](https://npm.io/package/request.md) *

## Alternatives

- [exif-parser](https://npm.io/package/exif-parser.md) — 3.8M weekly downloads
- [vite-plugin-compression](https://npm.io/package/vite-plugin-compression.md) — 569.5K weekly downloads
- [pica](https://npm.io/package/pica.md) — 442.4K weekly downloads
- [@reportportal/client-javascript](https://npm.io/package/@reportportal/client-javascript.md) — 408.8K weekly downloads
- [@tldraw/state](https://npm.io/package/@tldraw/state.md) — 316.0K weekly downloads

## Recent versions

- 0.3.1 (latest) — 2016-10-17
- 0.3.0 — 2016-01-21
- 0.2.1 — 2015-12-23
- 0.2.0 — 2015-12-23
- 0.1.0 — 2015-05-27
- 0.0.3 — 2015-05-18
- 0.0.2 — 2014-10-06
- 0.0.1 — 2014-10-06

## README

Gyazo-API
=========
[Gyazo API](https://gyazo.com/api/docs) wrapper for Node.js

- https://github.com/shokai/node-gyazo-api
- https://www.npmjs.org/package/gyazo-api

[![Circle CI](https://circleci.com/gh/shokai/node-gyazo-api.svg?style=svg)](https://circleci.com/gh/shokai/node-gyazo-api)


Usage
-----

Register new application and get [ACCESS TOKEN](https://gyazo.com/oauth/applications), then

### upload("filepath") or upload("stream")

```javascript
var Gyazo  = require('gyazo-api');
var client = new Gyazo('ACCESS_TOKEN');

client.upload('/path/to/file.jpg', {
  title: "my picture",
  desc: "upload from nodejs"
})
.then(function(res){
  console.log(res.data.image_id);
  console.log(res.data.permalink_url);
})
.catch(function(err){
  console.error(err);
});
```

### list

```javascript
client.list({page: 1, per_page: 50})
.then(function(res){
  console.log(res.data[0]);
  console.log(res.response.headers['x-current-page']); // => 1
  console.log(res.response.headers['x-per-page']);     // => 50
})
.catch(function(err){
  console.error(err);
});
```

### delete

```javascript
client.delete(image_id)
.then(function(res){
  console.log(res.data.image_id);
});
```


Test
----

setup

    % npm install
    % export GYAZO_TOKEN=a1b2cdef3456   ## set your API Token

run test

    % npm test

or

    % npm run watch


Contributing
------------
1. Fork it
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 new Pull Request

---
_Source: https://npm.io/package/gyazo-api · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
