Giter Site home page Giter Site logo

ryzokuken / cyberoam.js Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 1.0 146 KB

A JavaScript library for accessing cyberoam

Home Page: https://www.npmjs.com/package/cyberoam

License: GNU General Public License v3.0

JavaScript 100.00%
node javascript cyberoam module npm

cyberoam.js's Introduction

cyberoam.js

A JavaScript library for accessing cyberoam

Installation

$ npm install cyberoam --save

Usage

const Cyberoam = require('cyberoam');

// For information about the object, see the "options" section below
const options = { ... };

const cyberoam = new Cyberoam(options);

cyberoam.login(username, password)
  .then(() => { ... })
  .catch((errorMessage) => { ... });

cyberoam.logout(username)
  .then(() => { ... })
  .catch((errorMessage) => { ... });

// You don't really want to do anything if it's already live
cyberoam.checkLiveStatus(username)
  .catch(() => { ... });

Options

You may wish to provide any of the following options when creating an object of type Cyberoam. Any options skipped out will be replaced by their respective default values.

  1. loginURL: String

The URL for the login/logout page at cyberoam.

Default Value: "http://172.16.68.6:8090/login.xml"

  1. liveURL: String

The URL for the live page at cyberoam.

Default Value: "http://172.16.68.6:8090/live"

  1. loginMessage: String

The message that is returned upon successful login.

Default Value: "You have successfully logged into JIIT Internet Server.

  1. logoutMessage: String

The message that is returned upon successful login.

Default Value: "You have successfully logged off from JIIT Internet Server."

  1. commonOptions: Object

The common options that are passed to each call to the request function

Default Value:

  {
    timeout: 1000
  }

Setup (for contributors)

$ git clone https://github.com/ryzokuken/cyberoam.js.git
$ cd cyberoam.js
$ npm install

License

GPL-3.0 © Ujjwal Sharma

cyberoam.js's People

Contributors

ryzokuken avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.