Skip to content
This repository has been archived by the owner on Apr 25, 2022. It is now read-only.

sshh12/CFISD-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CFISD API

The python backend for the Cy-Ranch App and the CFISD App.

Live Code

Key Dependencies

API

GET /api/news/{ school }/all

Returns all news

{
  "news": {
    "all": [
      {
        "date": "January 01, 2000",
        "image": "",
        "link": "#",
        "organization": "The Cy-Ranch App",
        "text": "This is a test.",
        "type": 2
      },
      ...
    ]
  }
}
GET /api/faculty[?url=http://link/to/webpages/]

Returns a list of all teachers.

{
  "A": [ // Last Name Letter
    {
      "website": "https://sites.google.com/path/to/site",
      "name": "Last, First",
      "email": "email@cfisd.net"
    },
    ...
  ],
  ...
}
POST password -> /api/current/{ student id }

Returns current grades and classwork for student

{
  "grades": [
    {
      "name": "Honors Class",
      "honors": true,
      "letter": "A",
      "overallavg": "100.00%",
      "categories": {
        "Major Grades": {
          "weight": 0.4,
          "letter": "A",
          "grade": "100.00%"
        },
        ...
      },
      "assignments": [
        {
          "name": "A Class Assignment",
          "date": "MM/DD/YYYY",
          "datedue": "MM/DD/YYYY",
          "gradetype": "Major Grades",
          "letter": "A",
          "grade": "100.00%"
        },
        ...
      ]
    },
    ...
  ],
  "status": "success"
}
POST password -> /api/reportcard/{ student id }

Returns reportcard for student

{
  "reportcard": [
    {
      "name": "A Class",
      "exams": [
        {
          "average": 100.0,
          "letter": "A"
        },
        ...
      ],
      "semesters": [
        {
          "average": 100.0,
          "letter": "A"
        },
        ...
      ],
      "teacher": "Last, First",
      "room": "4231",
      "averages": [
        {
          "average": 100,
          "letter": "A"
        },
        ...
      ]
    },
    ...
  ],
  "status": "success"
}
POST password -> /api/transcript/{ student id }

Returns transcript for student

{
  "gpa": {
    "value": 4.0,
    "rank": 50,
    "class_size": 1000
  },
  "status": "success"
}
POST password -> /api/attendance/{ student id }

Returns attendance info for student

{
  "months": [
    {
      "name": "May 2018",
      "timestamp": 1525150800.0,
      "days": [
        {
          "day": 1,
          "timestamp": 1525150800.0,
          "info": {
            "1": "Field Trip Instructional",
            "2": "Field Trip Instructional"
          }
        },
        ...
      ]
    },
    ...
  ],
  "status": "success"
}

Tests

python -m tests.manual