banner-api

1.3.0 • Public • Published

BannerApi-npm

Installation

npm install banner-api

Usage

To get an instance of the API use:

var banner-api = require('banner-api')
banner-api.create("schoolCode","UserId","Pass",callback)

The passed in callback function will be called with the apiInstance once it is loaded

An apiInstance has a field apiEndpoints that is an array of apiEndpoints

An apiEndpoint has

  • A method call(callback) with the returned data from the endpoint being passed to the callback function in the format:
{
    name:EndpointName String,
    data:EndpointData Dictionary
}
  • Fields
    • apiType
    • apiName
    • urlName

For example to call and output data from all endpoints

var banner-api = require('banner-api')
banner-api.create("schoolCode","UserId","Pass", function(api) {
    for(in api.apiEndpoints){
        var endpoint = api.apiEndpoints[x]
        endpoint.call(function(data) {
            console.log(data['name'] + '')
            console.log(data['data'])
        })
    }
})

Known School Codes

  • Wilfrid Laurier University - 757

Package Sidebar

Install

npm i banner-api

Weekly Downloads

2

Version

1.3.0

License

ISC

Last publish

Collaborators

  • bentekkie