Giter Site home page Giter Site logo

booksapi's Introduction

This is a minimalist Web service built with the Go Programming Language.

#WORK IN PROGRESS

How to run:


Navigate to your GOPATH folder
git clone https://github.com/dharnnie/booksapi.git cd booksapi/app
go get ./... (to install dependencies)
go run main.go

You can easily test via postman


localhost:5000 {GET} (Prints hello world in console)

Requires a request body to create a bearer token. sample body: { "username":"poo", "password": "poo" } Meanwhile, I have created a token with that sample body and you can access other routes with it without having to request for your own bearer token

Bearer token : eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJwYXNzd29yZCI6IiIsInVzZXJuYW1lIjoiIn0.QzJ1vY-cvf3uHHadiE5IZLl40_kd-zgt1jQS6LOPdN77dtFa8gnSQe_3nNcvkJj-mzHGnbtINSd2q5nwBxU4GA


localhost:5000/books {GET}(Returns an Array if books) - Requires the bearer token
localhost:5000/books/{id} --- {GET}(Returns a single book by ID) ID could be from 1 - 8 [at this time] - Requires the bearer token
localhost:5000/books/{id} --- {POST} (Adds specified request body to the list and returns an updated list) - Requires the bearer token
localhost:5000/books/{id} --- {DELETE} (Deletes specified a single book with ID from the list) - Requires the bearer token

booksapi's People

Contributors

dharnnie avatar

Watchers

 avatar  avatar

Forkers

d-raj

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.