1.0.0 • Published 8 years ago

recycle_api v1.0.0

Weekly downloads
1
License
Apache-2.0
Repository
-
Last release
8 years ago

recycle_api

RecycleApi - JavaScript client for recycle_api An API that provides life cycle information on a make and model of a handset, organized by district (kommune). The terminals are grouped in 10 buckets, and they start their life when they come online the first time. When the first terminal of a make and model comes online, this is the market introduction point. Later when terminals come online they enter bucket 0, and when they are gone/missing for more than 2 weeks, they are considered dead, and placed in bucket 9. In between a moving average is calculated and a terminal is placed in the corresponding bucket. The timespan from birth to death is continually updated, and the buckets are updated accordingly. This SDK is automatically generated by the Swagger Codegen project:

  • API version: 1.0.0
  • Package version: 1.0.0
  • Build date: 2016-10-27T10:39:22.759Z
  • Build package: class io.swagger.codegen.languages.JavascriptClientCodegen For more information, please visit http://apigw.telenor.no

Installation

For Node.js

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install recycle_api --save

git

If the library is hosted at a git repository, e.g. https://github.com/YOUR_USERNAME/recycle_api then install it via:

    npm install YOUR_USERNAME/recycle_api --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Getting Started

Please follow the installation instruction and execute the following JS code:

var RecycleApi = require('recycle_api');

var api = new RecycleApi.DefaultApi()

var make = "make_example"; // {String} terminal make to use (Samsung)

var model = "model_example"; // {String} terminal model to use (Galaxy S7)

var district = 3.4; // {Number} target district (kommune) https://www.ssb.no/offentlig-sektor/kommunekatalog


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getPetsById(make, model, district, callback);

Documentation for API Endpoints

All URIs are relative to https://localhost/v1

ClassMethodHTTP requestDescription
RecycleApi.DefaultApigetPetsByIdGET /terminal/informationFind information

Documentation for Models

Documentation for Authorization

inventoryImplicit

  • Type: OAuth
  • Flow: implicit
  • Authorization URL: https://apigw.telenor.no/oauth/v2/authorize
  • Scopes:
    • user: Grants read/write access to profile info only. Note that this scope includes user:email and user:follow.
    • user:email: Grants read access to a user’s email addresses.
    • user:follow: Grants access to follow or unfollow other users.
    • public_repo: Grants read/write access to code, commit statuses, and deployment statuses for public repositories and organizations.
    • repo: Grants read/write access to code, commit statuses, and deployment statuses for public and private repositories and organizations.
    • repo_deployment: Grants access to deployment statuses for public and private repositories. This scope is only necessary to grant other users or services access to deployment statuses, without granting access to the code.
    • repo:status: Grants read/write access to public and private repository commit statuses. This scope is only necessary to grant other users or services access to private repository commit statuses without granting access to the code.
    • delete_repo: Grants access to delete adminable repositories.
    • notifications: Grants read access to a user’s notifications. repo also provides this access.
    • gist: Grants write access to gists.
    • read:repo_hook: Grants read and ping access to hooks in public or private repositories.
    • write:repo_hook: Grants read, write, and ping access to hooks in public or private repositories.
    • admin:repo_hook: Grants read, write, ping, and delete access to hooks in public or private repositories.
    • read:org: Read-only access to organization, teams, and membership.
    • write:org: Publicize and unpublicize organization membership.
    • admin:org: Fully manage organization, teams, and memberships.
    • read:public_key: List and view details for public keys.
    • write:public_key: Create, list, and view details for public keys.
    • admin:public_key: Fully manage public keys.