Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[⚠️ WIP ⚠️] Api dev #45

Closed
wants to merge 14 commits into from
Closed

[⚠️ WIP ⚠️] Api dev #45

wants to merge 14 commits into from

Conversation

PotentialStyx
Copy link
Member

@PotentialStyx PotentialStyx commented Oct 13, 2020


⚠️ WARNING THIS IS A WORK IN PROGRESS DO NOT MERGE ⚠️


Closes #35

Api changes

progress:

  • api docs
  • serve api docs on site
  • add tokens
  • store tokens in db
  • token permissions
  • ratelimit's (maybe)
  • more api paths (edit, create entries)
  • api caching
  • non token paths
  • easy permissions extendability
  • admin panel for tokens

it allows for all routes in it to be pretended by a string
Move all this stuff to api.py so it is easier to edit and develop
Now make server take the api class from api.py add add to routes
No need to import api because it gets setup in server.py
Fixity those errors
Fix more flake8
@PotentialStyx PotentialStyx added enhancement New feature or request Database Related to the database labels Oct 14, 2020
@PotentialStyx PotentialStyx self-assigned this Oct 14, 2020
Add option to disable prepend in CustomRouteDef, to allow paths not pretended with /api
Python is dumb I forgot to capitalize True
@PotentialStyx
Copy link
Member Author

Once this is done I think I'll make server into its own "module" and start isolating different parts into like server.api, server.routes, and server.admin, and each can export a route def object, also commonly used functions could be in server.utils @mat-1 @JetStream0

Tho this should prob be finished + merged first

@PotentialStyx
Copy link
Member Author

PotentialStyx commented Oct 14, 2020

Apparently sub apps are a thing 🤦, adding item to checklist:

  • don't be dum, and over complicate things

I am leaving it unchecked

Sub-apps are a thing, so I'm switching to do that, the app should use all the base apps properties, so none to set, maybe later we can add api middle ware for token verification tho.
I switched api to be a sub app just making sure it's setup in server.py as well
Fix my dum error, I forgot to specify the subapp path first
Remove that damn extra white space
Add wiki so docs are ezer, I'll turn md to html later 
This can be used so like https://repldex.com/wiki/api could show api docs
Oof spelling errors, I hate them
@stjet
Copy link
Collaborator

stjet commented Jan 10, 2021

Any updates?

@PotentialStyx
Copy link
Member Author

PotentialStyx commented Jan 10, 2021

Any updates?

Yep, I'm going to yeet this branch and make a new one off of master, then ill apply theese changes to it. Then actually finish it

@PotentialStyx
Copy link
Member Author

This is outdated, and changed nothing, a new branch based on master should be made.

@PotentialStyx PotentialStyx deleted the api-dev branch January 26, 2021 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Database Related to the database enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

expanding api & adding tokens
3 participants