GithubHelp home page GithubHelp logo

listingslab-software / centralindex Goto Github PK

View Code? Open in Web Editor NEW

This project forked from touchlocal/centralindex-js

0.0 0.0 0.0 267 KB

Node.js library for Central Index, the world's local data exchange

Shell 0.01% JavaScript 99.99%

centralindex's Introduction

centralindex

Introduction

The centralindex Node.js module is an NPM module that allows Node.js developers to start using the Central Index API with minimal code. The Central Index is a global data exchange, with a simple REST/JSON api.

What do I need before I start?

Hello World

You'll need to install the centralindex module using

  npm install centralindex

Then your first script could look something like:

  // load the centralindex npm module
  var ci = require('centralindex');
  
  // configure your api key
  ci.setAPIKey('<insert api key here>');
    
  // pull a known entity by its unique entity_id
  ci.getEntity('379236608286720', function(error,body) {
    if(!err) {
      console.log(body);
    } else {
      console.log("Something went wrong");
    }
  });
  

You'll find further examples in the "examples" subdirectory.

Function reference

  • getEntity = function(entity_id, callback)
  • getEntitySearchWhatBylocation = function(what, where, per_page, page, country, language, callback)
  • getEntitySearchWhat = function(what, per_page, page, country, language, callback)
  • getEntitySearchWhoBylocation = function(who, where, per_page, page, country, callback)
  • getEntitySearchWho = function(who, per_page, page, country, callback)
  • getEntityAdvertisers = function(tag, where, limit, country, language, callback)
  • getEntityAdd = function(language, callback)
  • getEntityReport = function(entity_id, gen_id, language, callback)
  • getAutocompleteCategory = function(str, language, callback)
  • getAutocompleteLocation = function(str, country, callback)
  • getToolsDocs = function(object, format, callback)

See the API Docs for more information.

centralindex's People

Contributors

glynnbird avatar interbred-monkey avatar patternseek avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.