# peerindex

> PeerIndex API client for Node.js

Latest version **0.1.0** (published 2013-08-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install peerindex
pnpm add peerindex
yarn add peerindex
bun add peerindex
```

## 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.1.0 |
| Published | 2013-08-29 |
| First published | 2013-08-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.8 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Dirk Bonhomme |
| Maintainers | dirkbonhomme |
| Keywords | peerindex, api, social media, influence |

## Links

- npm: https://www.npmjs.com/package/peerindex
- Repository: https://github.com/dirkbonhomme/peerindex
- npm.io page: https://npm.io/package/peerindex

## Recent versions

- 0.1.0 (latest) — 2013-08-29

## README

# PeerIndex API client for Node.js

This library allows you to easily access all API endpoints for PeerIndex.
Refer to the [PeerIndex API documentation](https://developers.peerindex.com/docs/read/Home) for more details.

## Requirements

Request a free API key at https://developers.peerindex.com/

## Usage

Use the API key to create a PeerIndex instance

    var PeerIndex = require('peerindex');
    var pi = new PeerIndex(API_KEY);
    
Default configuration can be overriden by providing a config object

    var pi = new PeerIndex(API_KEY, {
        protocol: 'https',
        host: 'api.peerindex.com',
        port: 443,
        version: '1'
    });
    
Call any of the four API methods `actorBasic`, `actorExtended`, `actorTopic`, `actorGraph` with a parameters object and a callback function

    var parameters = {twitter_screen_name: 'dirkbonhomme'};
    pi.actorBasic(parameters, function(error, actor){
        if(error){
            console.log('Something went wrong', error);
        }else{
            console.log('Results', actor);
        }
    });
or

    var parameters = {twitter_id: '14375479'};
    pi.actorBasic(parameters, callback);
    
or

    var parameters = {peerindex_id: '1684545e-ac66-3954-b9fe-a2ddc098db3f'};
    pi.actorBasic(parameters, callback);

## Developing

The library is published to NPM and can be installed with the following command:

    $ npm install peerindex

## Testing

Navigate to this module's repository and make sure you have the development modules installed:

    $ npm install


Run the tests:

    $ npm test

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