GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - dispherical/hctb-api: An API server for Here Comes the Bus

BranchesTags
Open more actions menu

Latest commit

 

History

8 Commits
8 Commits

Folders and files

NameName
Last commit message
Last commit date
ui
ui
 
 
.gitignore
.gitignore
 
 
LICENSE.md
LICENSE.md
 
 
Procfile
Procfile
 
 
README.md
README.md
 
 
app.json
app.json
 
 
config.example.js
config.example.js
 
 
hass.js
hass.js
 
 
index.js
index.js
 
 
openapi.yaml
openapi.yaml
 
 
package.json
package.json
 
 
yarn.lock
yarn.lock
 
 

Repository files navigation

here comes the bus api

An unoffical API & Client for Here Comes The Bus

ui

To enable the UI, you can just append ENABLE_UI=true

ENABLE_UI=true yarn start

home assistant

Expiremental Home Assistant support has been added as of 2.1.0. Ensure you have a config.js with all of the fields filled out and a running hctb-api server and run node hass.js

known bugs

  • Accounts with multiple passengers listed face issues. As a temporary workaround, try using /api/passengers, then calling /api/session. You'll need to provide the route time UUID yourself. issue 2. Version 3 will overhaul the API entirely and should fix the issue.

api

There is also an openapi.yaml file in the root directory.

POST /api/passengers

Usage: Getting all of the users for an account. Use this if you have multiple students under one account.

Querystrings

  • user: Your HCTB email
  • pass: Your HCTB password
  • code: Your HCTB district code, it's usually a 5 digit code that is used by the district.

Example Response:

{
    "success": true,
    "cookie": ".ASPXFORMSAUTH=...",
    "passengers": [
        {
            "text": "David ",
            "value": "7385b4fa-4563-4f02-97ea-0492e461924"
        }
    ]
}

POST /api/login

Usage: Logins and grabs the location of the first student listed. This may fail if you have more than one student. See issue 2 to learn more.

Querystrings

  • user: Your HCTB email
  • pass: Your HCTB password
  • code: Your HCTB district code, it's usually a 5 digit code that is used by the district.

Example Response:

{
    "success": true,
    "name": "David",
    "person": "7385b4fa-4563-4f02-97ea-0492e4619248",
    "time": "24b3a39b-8dc8-4cf5-a98c-d8ab9b05d544",
    "lat": "33.7488",
    "lon": "-84.3877",
    "cookie": ".ASPXFORMSAUTH=...",
    "times": [
        {
            "id": "00b19431-c745-42cd-bb43-c1fe83a19f0d",
            "selected": true,
            "time": "AM"
        },
        {
            "id": "487f4d75-8e59-442a-9da4-a59424aecf1f",
            "selected": false,
            "time": "MID"
        },
        {
            "id": "9e89abd0-781c-4a2a-875f-a794c029330d",
            "selected": false,
            "time": "PM"
        }
    ]
}

POST /api/session

Usage: Preventing the need from logging in again until the cookie previously used expires.

Querystrings

  • cookie: The cookie which you have gotten from /api/login
  • person: The person UUID (from /api/login)
  • time: The bus route time UUID (from /api/login)
  • name: The person's name obtained from /api/loign

Example Response:

{
    "success": true,
    "name": "David",
    "person": "7385b4fa-4563-4f02-97ea-0492e4619248",
    "time": "24b3a39b-8dc8-4cf5-a98c-d8ab9b05d544",
    "lat": "33.7488",
    "lon": "-84.3877",
    "cookie": ".ASPXFORMSAUTH=...",
    "times": [
        {
            "id": "00b19431-c745-42cd-bb43-c1fe83a19f0d",
            "selected": true,
            "time": "AM"
        },
        {
            "id": "487f4d75-8e59-442a-9da4-a59424aecf1f",
            "selected": false,
            "time": "MID"
        },
        {
            "id": "9e89abd0-781c-4a2a-875f-a794c029330d",
            "selected": false,
            "time": "PM"
        }
    ]
}

hosting:

heroku | glitch

self-hosting

yarn install
yarn start

# or

npm install
npm start

About

An API server for Here Comes the Bus

Resources

Readme
AGPL-3.0 license
Activity

Stars

22 stars

Watchers

1 watching

Forks

6 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.