# chirp-rest

> twitter rest apis in nodejs

Latest version **1.0.0** (published 2014-07-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install chirp-rest
pnpm add chirp-rest
yarn add chirp-rest
bun add chirp-rest
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2014-07-23 |
| First published | 2014-05-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | ddo |
| Maintainers | ddo |
| Keywords | chirp, twitter, api, rest |

## Links

- npm: https://www.npmjs.com/package/chirp-rest
- Repository: https://ddo@github.com/ddo/chirp-rest
- Homepage: https://github.com/ddo/chirp-rest
- Issues: https://github.com/ddo/chirp-rest/issues
- npm.io page: https://npm.io/package/chirp-rest

## Dependencies (2)

- [debug](https://npm.io/package/debug.md) ^1.0.0
- [oauth-request](https://npm.io/package/oauth-request.md) 0.0.1

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2014-07-23
- 0.0.2 — 2014-05-30
- 0.0.1 — 2014-05-26
- 0.0.0 — 2014-05-25

## README

chirp-rest [![Build Status](https://travis-ci.org/ddo/chirp-rest.svg)](https://travis-ci.org/ddo/chirp-rest)
==============

> twitter rest apis in nodejs

[![NPM version](https://badge.fury.io/js/chirp-rest.png)](http://badge.fury.io/js/chirp-rest)
[![Dependency Status](https://david-dm.org/ddo/chirp-rest.png?theme=shields.io)](https://david-dm.org/ddo/chirp-rest)

[![Coverage Status](https://coveralls.io/repos/ddo/chirp-rest/badge.png?branch=master)](https://coveralls.io/r/ddo/chirp-rest?branch=master)
[![Code Climate](https://codeclimate.com/github/ddo/chirp-rest.png)](https://codeclimate.com/github/ddo/chirp-rest)

## Installation

```
npm i chirp-rest --save
```

## Usage

```js
var ChirpRest = require('./');

var twitter = new ChirpRest({
    consumer: {
        public: 'xxxxx',
        secret: 'xxxxx'
    },
    token: {
        public: 'xxxxx'
        secret: 'xxxxx'
    }
});

//get user timeline
twitter.get('https://api.twitter.com/1.1/statuses/user_timeline.json', function(err, body) {
    //body -> tweets
});
```

## [Example](/example.js)

* get user timeline

```js
twitter.get('https://api.twitter.com/1.1/statuses/user_timeline.json', function(err, body) {
    //body -> tweets
});
```

* get user timeline limit 5

```js
twitter.get('https://api.twitter.com/1.1/statuses/user_timeline.json', {
    count: 5
}, function(err, body) {
    //body -> tweets
});
```

* get user timeline

```js
twitter.get('https://api.twitter.com/1.1/statuses/user_timeline.json', function(err, body) {
    //body -> tweets
});
```

* post new status

```js
twitter.post('https://api.twitter.com/1.1/statuses/update.json', {
    status: 'chirp chirp'
}, function(err, body) {
    //body -> tweet data
});
```

https://dev.twitter.com/docs/api/1.1

## API

* ``.get(url, parameters, callback)``
* ``.post(url, parameters, callback)``

## Option

* ``url``:``String`` Twitter api endpoint
* ``parameters``: ``Object`` Twitter api parameters ``optional``
* ``callback``

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