GithubHelp home page GithubHelp logo

bilalmerokhel / store-rest-api-docker-image Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 15 KB

Flask REST Api for beginners like me :)

flask flask-sqlalchemy flask-restful jwt-authentication rest-api crud-api cloud-computing json-api json flask-marshmallow

store-rest-api-docker-image's Introduction

Flask Rest Api

Store REST API which contains CRUD and Auth mechanism with confirmation tokens. once you register go to this endpoint Method GET /api/v1/confirmation/user/{user_id} and get your confirmation token after that go to this endpoint Method GET /api/v1/user/confirmation/{confirmation_token}/confirmed and replace your confirmation token so you can confirm your account.

Installation

  • Fetch from docker hub via docker pull bilalkhan/store_rest_api:latest.
  • RUN docker run -d -p 80:5000 bilalkhan/store_rest_api:latest.
  • Go to 127.0.0.1 and you'll see 404 error, below are the endpoints.

Description

You can use postman or curl to fetch these endpoints. but before that make sure to use your mailgun domain and api key. Or you can use any other email service

Endpoints

Auth Endpoints

  • Method POST /api/v1/user/register

    {
       "username":test_username,
       "email": "[email protected]",
       "password":1234       
    }
    
  • Method GET /api/v1/user/confirmation/{confirmation_token}/confirmed

  • Method GET /api/v1/confirmation/user/{user_id}

  • Method POST /api/v1/user/login

    {
      "username" : "bilalkhan",
      "password" : "1234"
    }
    
  • Method GET /api/v1/user/{user_id}

  • Method DELETE /api/v1/user/{user_id}

  • Method POST /api/v1/user/token/refresh

  • Method POST /api/v1/user/logout

Posting and fetching store names with items in it

  • Method POST /api/v2/store/{store_name}
  • Method DELETE /api/v2/store/{store_name}
  • Method GET /api/v2/stores

Posting/Updating/Deleting and fetching items

  • Method POST /api/v2/item/{item_name}

    {
      "price": 12.99,
      "store_id": 1
    }
    
  • Method PUT /api/v2/item/{item_name}

    {
      "price": 20.99
    }
    
  • Method DELETE /api/v2/item/{item_name}

  • Method GET /api/v2/items

store-rest-api-docker-image's People

Contributors

bilalmerokhel avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.