npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

gnavi

v0.0.3

Published

GURUNAVI API client for Node.js

Downloads

1

Readme

#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