Skip to content

bentekkie/BannerApi-npm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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(x 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published