Giter Club home page Giter Club logo

rit-attendance-api's Introduction

Attendance API

An unofficial API to view and get attendance details from RIT Soft easily.

The endpoint is at https://attendance-api.onrender.com/

Check status of API here https://stats.uptimerobot.com/jWyn8flnWm

API Documentation

For detailed documetation of this API, take a look at https://attendance-api.onrender.com/docs


GET / : To check the status of the API
Parameters : None

Example response :

{
  "alive": "yes",
  "message": "Check out https://attendance-api.onrender.com/docs for more details"
}

POST /login : To login and set a cookie

Parameters : None
Request body (required) : application/json

Example body :

{
  "username": "string",
  "password": "string"
}

Example response :

{
  "message": "Login success. Cookie has been set successfully.",
  "session-cookie": "c85aisn4o4k8f7phqa3e2d4em5"
}

GET /login : To check login status

Parameters : session_cookie (cookie)

Example response :

{
  "admission_no": "20BR1xx71",
  "current_semester": "5",
  "roll_no": "27",
  "current_status": "APPROVED\n\t\t\t\t\t\n\n\t\t\t\t",
  "message": "You are already logged in."
}

GET /attendance : To get attendance details

Parameters : session_cookie (cookie)
Optional parameters (query) : starting_date (eg: 2022-06-29)
Optional parameters (query) : ending_date (eg: 2022-12-29)

Example reponse :

{
  "name": "Devadathan M B",
  "admission_no": "20BR1xx71",
  "course_name": "BTECH",
  "subject_attendance": [
    {
      "subject_name": "COMPUTER NETWORKS ",
      "subject_code": "CST303",
      "total_hours": "1",
      "present_hours": "1",
      "percentage": "100 %"
    },
    {
      "subject_name": "DISASTER MANAGEMENT ",
      "subject_code": "MCN301",
      "total_hours": "12",
      "present_hours": "12",
      "percentage": "100 %"
    },
   {
      "subject_name": "MANAGEMENT OF SOFTWARE SYSTEMS ",
      "subject_code": "CST309",
      "total_hours": "27",
      "present_hours": "24",
      "percentage": "88.89 %"
    }
   ...
  ],
  "total_attendance": " 96.59 % "
}

GET /attendance/lastupdate : To get last updated details of attendance

Parameters : session_cookie (cookie)

Example response :

{
  "CST303": {
    "subject_name": "COMPUTER NETWORKS ",
    "last_update": "22, Sep 2022 Thu"
  },
  "MCN301": {
    "subject_name": "DISASTER MANAGEMENT ",
    "last_update": "08, Nov 2022 Tue"
  },
  "CST309": {
    "subject_name": "MANAGEMENT OF SOFTWARE SYSTEMS ",
    "last_update": "26, Sep 2022 Mon"
  }
}

GET /attendance/absent : To get absent dates and details

Parameters : session_cookie (cookie)

Example response :

[
  {
    "subject_name": "SYSTEM SOFTWARE ",
    "subject_code": "CST305",
    "absent_date": "29, Dec 2022 Thu",
    "absent_hour": "1",
    "status": "ABSENT"
  },
  {
    "subject_name": "SYSTEM SOFTWARE ",
    "subject_code": "CST305",
    "absent_date": "24, Nov 2022 Thu",
    "absent_hour": "1",
    "status": "ABSENT"
  },
  {
    "subject_name": "MANAGEMENT OF SOFTWARE SYSTEMS ",
    "subject_code": "CST309",
    "absent_date": "31, Oct 2022 Mon",
    "absent_hour": "6",
    "status": "ABSENT"
  },
  {
    "subject_name": "SYSTEM SOFTWARE ",
    "subject_code": "CST305",
    "absent_date": "31, Oct 2022 Mon",
    "absent_hour": "5",
    "status": "ABSENT"
  },
  {
    "subject_name": "MANAGEMENT OF SOFTWARE SYSTEMS ",
    "subject_code": "CST309",
    "absent_date": "29, Oct 2022 Sat",
    "absent_hour": "6",
    "status": "ABSENT"
  }
] 

GET /attendance/present : To get present hours and details

Parameters : session_cookie (cookie)

Example response :

[
  {
    "subject_name": "SYSTEM SOFTWARE ",
    "subject_code": "CST305",
    "present_date": "26, Dec 2022 Mon",
    "present_hour": "5",
    "status": "PRESENT"
  },
  {
    "subject_name": "MANAGEMENT OF SOFTWARE SYSTEMS ",
    "subject_code": "CST309",
    "present_date": "21, Dec 2022 Wed",
    "present_hour": "3",
    "status": "PRESENT"
  },
  {
    "subject_name": "SYSTEM SOFTWARE ",
    "subject_code": "CST305",
    "present_date": "21, Dec 2022 Wed",
    "present_hour": "5",
    "status": "PRESENT"
  }
]

Note that this API returns data after scraping the website, so potential bugs may be present.

rit-attendance-api's People

Contributors

devadathanmb 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.