estimeo

0.1.5 • Public • Published

npm-estimeo-api

[PLATFORM][MODULE] Module for the Estimeo's Platform, dedicated to deal with the API

Table of Contents

Install

Local build integration:

$ npm install --save-dev estimeo

Global command-line interface:

$ npm install --global estimeo

Usage

Example

// Require the Estimeo module
const Estimeo = require('estimeo');

// Create a client with your unique and personal ids: public_key and private_key
const client = new Estimeo(process.env.PUBLIC_KEY, process.env.PRIVATE_KEY);

...

client.search().user({ name: 'jean' }).then(function(e) {
    const obj = e;                  // The result expected (JSON format or String)
}).catch(function(e) {
    const err = e.err;              // The error
    const status = e.status;        // The status of the request
    const message = e.message;      // [Optional] Message if relevant
});

API

Methods

The estimeo module exposes three main methods: _, search, get

_()

_() is the toolbox of the API. It lets you retrieve some information about your personal use of the API. You can access to two methods:

  1. access_level() which will send back to you your current access level on the API (public, personal, company, partner or custom).
  2. rate() which will send back to you your current rate limits.

Example 1:

client._().access_level().then(function(e) {
    console.log(e);
});

Should display for 'personal' access level:

'personal'

Example 2:

client._().rate().then(function(e) {
    console.log(e);
});

Should display:

  {
      next_period: Thu Sep 20 2018 10:15:00 GMT+0000 (UTC)
      search: {
          user: {
              limit: 50,
              remaining: 26,
          },
          open: {
              limit: 250,
              remaining: 131,
          },
          project: {
              limit: 75,
              remaining: 71,
          },
      },
      get: {
          limit: 250,
          remaining: 31,
      },
  }

search()

search() Lets you search over the Estimeo database to retrieve users, projects and startups from the startup pool. You can access to three methods:

  1. user(obj) which will lead you the user search result
  2. open(obj) which will lead you the startup from the startup pool search result
  3. project(obj) which will lead you the project search result

Example:

client.search().project({ query: 'myr' }).then(function(e) {
    console.log(e);
});

Should display for a personal access level:

  [{
      key: 'proj_abcd',
      name: 'MyRobotics',
      scored: true,
      logo_link: null
  }, {
      key: 'proj_wxyz',
      name: 'Myre',
      scored: true,
      logo_link: "https://media.licdn.com/dms/image/C510BAQHH4nPBqj8GyQ/company-logo_200_200/0?e=2128291200&v=beta&t=baftspGuWGEn34sOAbyKv8kljVcqrgzXZx8kJbm4eSk"
  }]

get(key)

get(key) Lets you retrieve a specific object from the Estimeo database.

Example:

client.get('proj_wxyz').then(function(e) {
    console.log(e);
});

Should display for a personal access level:

  {
      key: 'proj_wxyz',
      name: 'Myre',
      scored: true,
      logo_link: "https://media.licdn.com/dms/image/C510BAQHH4nPBqj8GyQ/company-logo_200_200/0?e=2128291200&v=beta&t=baftspGuWGEn34sOAbyKv8kljVcqrgzXZx8kJbm4eSk"
  }

Readme

Keywords

none

Package Sidebar

Install

npm i estimeo

Weekly Downloads

0

Version

0.1.5

License

ISC

Unpacked Size

27 kB

Total Files

14

Last publish

Collaborators

  • estimeo