Skip to content

The most useless API in the history of APIs- CRUD+ operations on a Shelve database that stores longboard specifications.

Notifications You must be signed in to change notification settings

logiczsniper/Longboard-RESTful-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

The idea behind this project was to build an API that could complete the basic CRUD operations on 'longboard' objects that are stored in a Shelve database. The following is the base 'longboard' object:

{
    "id": "XXX",
    "name": "XXXXX",
    "length": "XX",
    "width": "XX"
}
Project Structure

The project is divided into two sections:

  1. Java
    On the Java side is the swift GUI and the HTTP methods using Unirest that are used by the GUI.
  2. Python
    On the Python side is the API itself. It is built with Flask and Flask-RESTful. In order to run the Java GUI, the Flask application is run locally.
Options

The following are the possible endpoints and their possible requests:

  • To all longboards-
    GET /longboards
    POST /longboards
    OPTIONS /longboards
    DELETE /longboards

  • To a specific longboard-
    GET /longboard/{identifier}
    HEAD /longboard/{identifier}
    DELETE /longboard/{identifier}
    PUT /longboard/{identifier}
    PATCH /longboard/{identifier}
    OPTIONS /longboard/{identifier}

Status Codes

I determined which status code to return based on the following information provided here.

  • 200 OK
    Standard response for successful HTTP requests.
  • 201 Created
    The request has been fulfilled, resulting in the creation of a new resource.
  • 204 No Content
    The server successfully processed the request and is not returning any content.
  • 400 Bad Request
    The server cannot or will not process the request due to an apparent client error
  • 404 Not Found
    The requested resource could not be found but may be available in the future.
Acknowledgments

There are two main sources of information that helped me incredibly: Jake Wright and Assertible. Thanks for helping me learn more about APIs!

Links to images:

Links to sounds:

About

The most useless API in the history of APIs- CRUD+ operations on a Shelve database that stores longboard specifications.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published