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 - mjpin7/GamerBodBot-API: REST API created for my Discord bot

BranchesTags
Open more actions menu

Latest commit

 

History

78 Commits
78 Commits

Folders and files

NameName
Last commit message
Last commit date
files
files
 
 
models
models
 
 
resources
resources
 
 
.gitignore
.gitignore
 
 
Aptfile
Aptfile
 
 
Procfile
Procfile
 
 
README.md
README.md
 
 
app.py
app.py
 
 
db.py
db.py
 
 
requirements.txt
requirements.txt
 
 
run.py
run.py
 
 
runtime.txt
runtime.txt
 
 
uwsgi.ini
uwsgi.ini
 
 

Repository files navigation

Python

GamerBodBot-API

This repo contains source code for my REST-API to be used by my bot GamerBotBot. The API is deployed on Heroku and is currently being used. It uses a user system to authenticate users to access endpoints. Also connects to a PostgreSQL database for various storage.

Contents

  • Dependancies
  • Endpoints

Dependancies

Flask

  • Used as the web framework for the api

Flask-JWT Extended

  • This is used for the user authentication of the api
  • Creates user tokens to access endpoints

Flask-SQLAlchemy

  • Flask wrapper for the SQLAlchemy package
  • Allows management of database in classes and objects
  • Models held in models folder

Flask-RESTful

  • An extenstion to flask that helps create REST APIs

bcrypt

  • Used for encryption of users passwords

uwsgi

  • Used for serving the python application to Heroku

psycopg2

  • PostgreSQL adapter for Python

Endpoints

  • /register
    • Registers a user into the API
    • Puts user in database
    • Required info:

    {"username": "<username>", "password": "<password>"}

  • /login
    • Logs user into the API (provides a valid user with a JWT token)
    • Required info:

    {"username": "<username>", "password": "<password>"}

  • /refresh
    • Provides a new (but not fresh) token to a valid user
    • Used once a token expires
  • /meme
    • Returns a random meme to the user
  • /backlog/<string: user_id>
    • Adds (POST), updates (PUT), retrieve (GET) backlog items. A backlog item is currently limited to only games.
    • Required info:

    {"game": "<game>", "status": "<status: unplayed, playing, finished>"}

  • /backloglist/<string: user_id>
    • Returns the list of the users backlog

About

REST API created for my Discord bot

Topics

apibotdiscordpython

Resources

Readme
Activity

Stars

1 star

Watchers

0 watching

Forks

1 fork
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.