Giter Site home page Giter Site logo

aums-api's Introduction

A PHP API for AUMS

This is an unofficial api written in PHP to access the Amrita University Manangement System in a secure manner.

This API is as secure as logging in from the AUMS website

Including the library

This library uses Composer for dependency management and autoloading.

Include this in your composer.json file

"repositories": [
    {
        "type": "vcs",
        "url": "https://github.com/niranjan94/aums-api"
    }
],
"require": {
    "niranjan94/aums-api": "dev-master"
}

Run composer update and you're good to go.

Usage instructions

Initialize the \Aums\API class.

$api = new \Aums\API("full_roll_number", "password");

Call the setStorageDir method and set the storage directory to a writable directory

/**
 * Set the storage directory to store cookies and image files
 * @param string $storageDir
 * @throws StorageIOException
 */
$api->setStorageDir($path_to_a_writable_dir)

Call the login method

/**
 * Start the login flow
 * @throws AumsOfflineException
 * @throws CredentialsInvalidException
 * @throws CredentialsMissingException
 * @return array An array containing basic student info and link to profile pic
 */
$api->login()

Do whatever you wanna do with the output ;-)

// Example output
Array
(
    [roll_no] => CB.EN.U4AEE12029
    [first_name] => NIRANJAN
    [last_name] => R
    [email] => [email protected]
    [phone] => 9600514966
    [degree_program] => B.Tech2012
    [branch] => AE
    [semester] => 7
    [image_filename] => U3TqEMc7FoJey8mlbQu8LLGFwY8owf-I67I2gR41uGU
)

aums-api's People

Contributors

niranjan94 avatar

Watchers

James Cloos 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.