Skip to content

ConsumerSearch/3scale-nodejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

3scale.js

Basic Node JS module to communicate with 3Scale. This module has minimum implementation for now:

  • Logging

usage

Include the threescale module and create a new ThreeScaleClient object. Execute the necesar calls on the client object that correspond with the API.

    var ThreeScaleClient = require('3scale').ThreeScaleClient;
    
    var client = new ThreeScaleClient("APIKEY");
    // Build transactions array
    var transactions = [
      { 
        "app_id" : "ID of the application to report the transaction for",
        "usage" : "Array of usage values.",
        "timstamp" : "optional"  
      }
    ];
    
    var callback = function(err, data) {
      // Do something
    }
    client.report(transactions, callback);

3Scale API doc

For full possibilities, see the 3scale API docs (http://www.3scale.net/support/api-service-management-v2-0/) or their own libraries (http://github.com/3scale)

About

Simple integration of 3scale into a nodejs module

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published