Socket
Socket
Sign inDemoInstall

gnavi

Package Overview
Dependencies
47
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    gnavi

GURUNAVI API client for Node.js


Version published
Weekly downloads
3
increased by200%
Maintainers
1
Install size
3.73 MB
Created
Weekly downloads
 

Readme

Source

#About

Node.jsからぐるなびAPIを利用するためのクライアントモジュールです。
ご利用の際には、まずぐるなびWebサービスへのユーザ登録をして、アクセスキーを取得してください。

This is a client module for utilizing GURUNAVI API from Node.js.
Please get your access key for GURUNAVI Web Service before using this module.

#Usage

##Initialize

var client = require("gnavi").initClient("YOUR_KEYID_HERE");

##Methods ###restSearch(options,callback)

  • options : {object}
  • callback : function(err,data){}
client.restSearch({format:"json"},function(err,data){
    if(err) throw err;
    console.log(data)
});

レストラン検索API(ver.1)を使うことができます。optionsに指定できる項目と値については、ぐるなびAPIドキュメント をご覧ください。

This method accesses to Restaurant Search API ver.1. You could learn about detail prameters of options in document of GURUNAVI API

###restSearch2(options,callback)

  • options : {object}
  • callback : function(err,data){}
client.restSearch({format:"xml"},function(err,data){
    if(err) throw err;
    console.log(data)
});

レストラン検索API(ver.2)を使うことができます。optionsに指定できる項目と値については、ぐるなびAPIドキュメント をご覧ください。

This method accesses to Restaurant Search API ver.2. You could learn about detail prameters of options in document of GURUNAVI API

###ouen(options,callback)

  • options : {object}
  • callback : function(err,data){}
client.ouen({format:"json", latitude:35.65858, longitude:139.745433, range:2},function(err,data){
    if(err)throw err;
    console.log(data);
});

応援口コミAPIを使うことができます。optionsに指定できる項目と値については、ぐるなびAPIドキュメント をご覧ください。

This method accesses to Ouen Kuchikomi API. "Ouen Kuchikomi" is word-of-mouth advertising posted by users for cheering a restaurant. You could learn about detail prameters of options in document of GURUNAVI API

###areaSearch(options,callback)

  • options : {object}
  • callback : function(err,data){}
client.areaSearch({format:"xml"},function(err,data){
    if(err)throw err;
    console.log(data);
});

エリアマスタ取得APIを使うことができます。ドキュメントには、指定可能項目は書かれていませんが、formatjsonxmlで指定することができます。

This method accesses to Area Master API. Document of the API does not mention about parameters of options, but it is able to signify format as json or xml.

###prefSearch(options,callback)

  • options : {object}
  • callback : function(err,data){}
client.prefSearch({format:"json"},function(err,data){
    if(err)throw err;
    console.log(data);
});

都道府県マスタ取得APIを使うことができます。ドキュメントには、指定可能項目は書かれていませんが、formatjsonxmlで指定することができます。

This method accesses to Prefecture Master API. Document of the API does not mention about parameters of options, but it is able to signify format as json or xml.

###gAreaSearch(scale,options,callback)

  • scale : "string"
  • options : {object}
  • callback : function(err,data){}
client.gAreaSearch("large",{lang:"ja",format:"xml"},function(err,data){
    if(err)throw err;
    console.log(data);            
});

エリア(L・M・S)マスタ取得APIを使うことができます。L、M、Sの選択は、scale"large""middle""small"で指定します。ドキュメントには、lang以外の指定項目は書かれていませんが、formatjsonxmlで指定することができます。

This method accesses to Scaled Area Master API. The scale is defined as Large, Middle, and Small, which is signified in scale by string: "large", "middle", and "small". Document of the API does not mention about parameters of options except for lang, but it is able to signify format as json or xml.

###categorySearch(scale,options,callback)

  • scale : "string"
  • options : {object}
  • callback : function(err,data){}
client.categorySearch("large",{format:"json"},function(err,data){
    if(err)throw err;
    console.log(data);            
});

(大・小)業態マスタ取得APIを使うことができます。大・小の選択は、scale"large""small"で指定します。ドキュメントには、指定可能項目は書かれていませんが、formatjsonxmlで指定することができます。

This method accesses to Scaled Category Master API. The scale is defined as Large and Small, which is signified in scale by string: "large" and "small". Document of the API does not mention about parameters of options, but it is able to signify format as json or xml.

#Test The test is performed by jasmine-node.

$ jasmine-node spec/ --config keyid YOUR_KEYID_HERE

##Licence MIT

FAQs

Last updated on 08 Dec 2014

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc