Socket
Socket
Sign inDemoInstall

node-yj

Package Overview
Dependencies
3
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    node-yj

NodeJS wrapper for the Yahoo! JAPAN API


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

node-yj

=======

A Node.JS module, which provides an object oriented wrapper for the YJDN APIs.

Installation

Install with the node package manager, npm:

$ npm install node-yj

or

Install via git clone

$ git clone git://github.com/Lewuathe/node-yj.git
$ cd node-yj
$ npm install

How to use

If you already have access_token of yconnect, you can access any API in YJDN. Return value is default json considering of node availability.

Not require authorization

For example, YOLP, text analysis, Shpping API and so on does not require authorization token. So whenever you like, you can access these APIs.

var YJAPI = require('node-yj');

var yjClient = new YJAPI({
    service : "text"
});

yjClient.text.kanaConvert({
    sentence : "きょうはいいてんきですね",
	appid : <Your Application ID>
}, function(res){
    // res is server response.
	// Use as you like
});

Require authorization

When you want to access userInfo API, you need access_token via YConnect. You can get this access_token with passport-yj. In this case, your code should be like below.

var YJAPI = require('node-yj');

var yjClient = new YJAPI({
    service : "yconnect"
});

yjClient.yconnect.userInfo({
    accessToken : <Access Token>
}, function(res){
    // res is server response.
	// Use as you like
});

Test

Before running test code, you have to make own appid configuration file like below.

{
    "appid" : <YOUR_APP_ID>
}

This file is put on test/ as named config.json. And then, you can run test code.

$ npm install --dev
$ make test

However vows module does not support node v0.10.0. So this test codes require under v0.10.0 versions.

License

MIT License. Please see the LICENSE file in details.

FAQs

Last updated on 02 Apr 2013

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