Skip to content

Glavin001/Self-Service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node.js API for Saint Mary's University Self-Service.


Installation

npm install self-service-banner --save

Usage

//
var selfService = require("self-service-banner");

// Login Credentials for Authentication
var creds = {
   "username": "A-Number",
   "password": "123567890"
};

// Create your connection instance.
var s = new selfService;

// Authenticate your connection by logging in with your credentials.
s.login({"username": creds.username, "password": creds.password }, function(error, response, localService) {
    if (!error) {
      // Successful
      localService.weekAtAGlance({ /*'startDate': new Date()*/ }, function(error, response, courses) {
          if (!error) {
              // Successful
              console.log("Completed!", courses);
          } else {
              // An error occured
              throw error;
          }
      });

    } else {
        // An Error occured.
        throw error;
    }

});

For Contributors

  1. Use Git to clone this repository.

  2. Download all of your dependencies.

npm install
  1. Create your credentials file: ./credentials.json
{
    "username": "A-Number",
    "password": "password"
}
  1. Test your credentials by running the built-in Unit Tests.
npm test

About

Node.js API for Saint Mary's University Self-Service Banner.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published