Skip to content

Latest commit

 

History

History
53 lines (41 loc) · 1.21 KB

File metadata and controls

53 lines (41 loc) · 1.21 KB

Capstone API server

REST API server that serves capstone.

Docs

Firestore SDK
Uvicorn
FastAPI

Getting started

Requirements

  • Python version >= 3.6
  • pip version >= 9.0
  • uvicorn pip install uvicorn
  • fastapi pip install fastapi

Run the server

Run the server uvicorn main:app --reload

Run server on specific port

uvicorn main:app --reload --port <port number>

Access the API UI

On your browser, go to

http://127.0.0.1:8000/docs

Covered types of places

Place Types docs
gas_station
restaurant
supermarket

the rest of the places will be covered by the 'else' attributes in the Firebase 'cards' collection.

REST endpoints

/latlong/user_id
Returns stores within 500m in radius with best card recommendation for that user.

{
        "store_name": str,
        "card_bank": str,
        "card_name": str,
        "cashback_amount": int,
        "distance": double,
        "img" str, 
},
.
.
.