Communicate with the official schoolsoft api
Project description
schoolsoft-api-app
A wrapper for schoolsofts undocumented api they use in their app.
Usage:
>>> import schoolsoft_api
>>> app_key = schoolsoft_api.get_app_key(name, password)
>>> token = schoolsoft_api.get_updated_token(app_key_json=app_key)['token']
>>> schoolsoft_api.get_lunch(token, school)
[{'saturday': '', 'week': 33, 'updById': 1917, 'creByType': -1, 'creDate': '2020-08-11 14:41:04.0', 'dishCategoryName': 'Lunch', 'creById': 6271, 'thursday': '', 'dates': ['2020-08-10', '2020-08-11', '2020-08-12', '2020-08-13', '2020-08-14', '2020-08-15', '2020-08-16'], 'orgId': 28, 'updDate': '2020-08-14 09:46:56.0', 'empty': False, 'updByType': -1, 'sunday': '', 'tuesday': '', 'dish': 3, 'wednesday': '', 'friday': 'Spagetti med köttfärsås.\r\n\r\nSpagetti med sojafärssås', 'id': -1, 'monday': ''}]
- Obtain a permanent app key. This only needs to be generated once.
- Generate a temporary token. This needs to get generated once every ~3h.
- Call the API with the token.
Note:
- Some functions might not work for you since OrgID might impact the request urls, please report it in issues. I cannot do further testing to prove this hypothesis since I only own one account.
- Use
get_updated_token()
to prevent requesting too many new tokens
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
schoolsoft_api-1.0.2.tar.gz
(3.9 kB
view details)
Built Distribution
File details
Details for the file schoolsoft_api-1.0.2.tar.gz
.
File metadata
- Download URL: schoolsoft_api-1.0.2.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8debb28f24a9490ac146eb3cf25b049fdd31b4710dcd32fd25b19b718e68643b |
|
MD5 | 2d8f04f428b4d8a682ef827f76473e54 |
|
BLAKE2b-256 | 4c3e4e6fb42b6e3aa3b8172fd79b84720bc49d627c5acf1ddd1dcfa1a10b92aa |
File details
Details for the file schoolsoft_api-1.0.2-py3-none-any.whl
.
File metadata
- Download URL: schoolsoft_api-1.0.2-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5ea849ae3a8f83b33a546907a1fde062db4a88635451b4c680abd4c3e368a62 |
|
MD5 | 06b0f3aeabdfc5c4fd734c43c9fd40fa |
|
BLAKE2b-256 | b74d3d5b8e065c2139fa37cd326edc9382e4176cb708e184e50660887580f26f |