File detailing what I've worked out so far from investigating the Show My Homework API.
API requests are made in the form of a HTTPS GET request to the SMH API endpoint.
| #!/usr/bin/python3 | |
| import os | |
| os.environ['PYGAME_HIDE_SUPPORT_PROMPT'] = "hide" | |
| import pygame.time as time | |
| import i2cVC | |
| import random | |
| random.seed() |
| #!/usr/bin/env python3 | |
| import logging | |
| from time import sleep | |
| import json | |
| # dependencies are: | |
| # stomp.py, termcolor | |
| from termcolor import colored |
| import os.path as path | |
| # dirname__ will be the absolute directory that current .py file is in | |
| dirname__ = path.dirname(path.abspath(__file__)) |
| const fs = require('fs'); | |
| const fetch = require('node-fetch'); | |
| const FormData = require('form-data'); | |
| const filePath = `path/to/file.ext`; | |
| const form = new FormData(); | |
| const stats = fs.statSync(filePath); | |
| const fileSizeInBytes = stats.size; | |
| const fileStream = fs.createReadStream(filePath); | |
| form.append('field-name', fileStream, { knownLength: fileSizeInBytes }); |
File detailing what I've worked out so far from investigating the Show My Homework API.
API requests are made in the form of a HTTPS GET request to the SMH API endpoint.
| { | |
| "AF": "Afghanistan", | |
| "AX": "Aland Islands", | |
| "AL": "Albania", | |
| "DZ": "Algeria", | |
| "AS": "American Samoa", | |
| "AD": "Andorra", | |
| "AO": "Angola", | |
| "AI": "Anguilla", | |
| "AQ": "Antarctica", |