An open API service indexing awesome lists of open source software.

https://github.com/codedotjs/acuter

:bird: NodeJS wrapper for media available on twitter
https://github.com/codedotjs/acuter

Last synced: 9 months ago
JSON representation

:bird: NodeJS wrapper for media available on twitter

Awesome Lists containing this project

README

          




acuter



> NodeJS API for Twitter media

## Install

```
$ npm install --save acuter
```

## Structure

```js
const acuter = require('acuter');

acuter.options('username/links').then(mediaLink => {
console.log(mediaLink);
// => get the URL
})
```
__Options :__
__profile__  :  username
__cover__    :  username
__single__   :  tweet's link
__preview__  :  tweet's link
__gif__      :  tweet's link

__vidPrev__  :  tweet's link

## Usage

__There are multiple uses of ```acuter```, it extracts :__

Profile picture's url of a twitter user :

__Example :__

```js
const acuter = require('acuter');

acuter.profile('Rishi_Giri_').then(imgLink => {
console.log(imgLink);
// => https://pbs.twimg.com/.../Lmp-G_Vm_400x400.jpg
});
```

Cover image's url of a twiter user :

__Example :__

```js
const acuter = require('acuter');

acuter.cover('Rishi_Giri_').then(imgLink => {
console.log(imgLink);
// => https://pbs.twimg.com/.../1384327436/1500x500
});
```

Single image's url, shared on twitter :

__Example :__

```js
const acuter = require('acuter');

acuter.single('https://twitter.com/.../738792492510').then(imgLink => {
console.log(imgLink);
// => https://pbs.twimg.com/.../CkC32IeUYAAcZnZ.jpg
});
```

Preview of a __```gif```__ available on twitter :

__Example :__

```js
const acuter = require('acuter');

acuter.preview('https://twitter.com/.../7340008544').then(imgLink => {
console.log(imgLink);
// => https://pbs.twimg.com/.../Ci-xqR8WEAAoYtK.jpg
});
```

Downloadable __```link```__ of __a ```gif```__ from user's tweet's url :

__Example :__

```js
const acuter = require('acuter');

acuter.gif('https://twitter.com/.../734001198752544').then(gifLink => {
console.log(gifLink);
// => https://pbs.twimg.com/.../Ci-xqR8WEAAoYtK.mp4
});
```

Preview __```link```__ of a __```video```__ available on twitter :

__Example :__

```js
const acuter = require('acuter');

acuter.vidPrev('https://twitter.com/video../738..028').then(gifLink => {
console.log(gifLink);
// => https://o.twimg.com/../proxy.jpg...SAFSDFUYY
});
```

## Related

- [twiger](https://github.com/CodeDotJS/twiger) : Download media available on twitter with an ease.

## License

MIT © [Rishi Giri](http://rishigiri.com)