3scale-senico 中文文档教程

发布于 12年前 浏览 27 项目主页 更新于 3年前

3scale integration plugin for JavaScript/CoffeeScript/Node.js applications Build Status

3scale 是一种 API 基础设施服务,可处理 API 密钥、速率限制、分析、账单支付和开发人员管理。 包括可配置的 API 仪表板和开发人员门户 CMS。 http://www.3scale.net/ 上的更多产品资料,http://support.3scale.net/ 上的支持信息。

Requirements

  • libxml2 library

Installation

该模块通过包管理器 npm 交付,因此安装应该很简单:npm install 3scale

Testing

要运行测试:vows test/* --spec

在根目录中的项目。

Usage

var Client = require('3scale').Client;

client = new Client("your provider key");

client.authorize({app_id: "your application id", app_key: "your application key"}, function(response){
  sys.log(sys.inspect(response));
});

// Or for reports

var trans = [
              { "app_id": "your application id", "usage": {"hits": 1}},
              { "app_id": "your application id", "usage": {"hits": 1000}}
             ]

client.report(trans, function(response){
  sys.log(sys.inspect(response));
});

3scale integration plugin for JavaScript/CoffeeScript/Node.js applications Build Status

3scale is an API Infrastructure service which handles API Keys, Rate Limiting, Analytics, Billing Payments and Developer Management. Includes a configurable API dashboard and developer portal CMS. More product stuff at http://www.3scale.net/, support information at http://support.3scale.net/.

Requirements

  • libxml2 library

Installation

The module is delivered through the package manager npm, so that the installation should be easy as: npm install 3scale

Testing

To run tests: vows test/* --spec

In the root of the project.

Usage

var Client = require('3scale').Client;

client = new Client("your provider key");

client.authorize({app_id: "your application id", app_key: "your application key"}, function(response){
  sys.log(sys.inspect(response));
});

// Or for reports

var trans = [
              { "app_id": "your application id", "usage": {"hits": 1}},
              { "app_id": "your application id", "usage": {"hits": 1000}}
             ]

client.report(trans, function(response){
  sys.log(sys.inspect(response));
});
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文