Giter VIP home page Giter VIP logo

devbops_blog_microservice's Introduction

Devblops blog microservice

Build Status

Issue Tracker

  • Token should be in header (API Gateway)
  • Comments should have date/time (Backend)

Blog Frontend

Action:

  • C for create blog
  • R for retrieve all blogs
  • D for delete a blog
  • Q for adding a comment in a blog

Request methods and templates

  • Request Body
{
    "Token": str <REQUIRED>,
    "Action": str <REQUIRED>,
    "BlogSubject": str / null if action = R ,
    "BlogBody": str / null if action = R, D, Q ,
    "Location": str / null if action = R, D, Q ,
    "Date": str / null if action = R, D, Q ,
    "Time": str / null if action = R, D, Q,
    "Comment": str / null if action = C, R, U, D
}
  • Response Body
{
   "statusCode": 200,
   "Status": boolean,
   "BlogSubject": str / null,
   "Error": str / null,
   "Description": str,
   "BlogDB": Array of dicts / null
}

Route

POST to https://0c77865x10.execute-api.us-east-1.amazonaws.com/v1/blog

Examples

  • Create blog
Request body:
{
 "Token": <Token>,
 "Action": "C",
 "BlogSubject": "First Blog",
 "BlogBody": "Hello world",
 "Location": <Location>,
 "Date": <Date>,
 "Time": <Time>,
 "Comment": null
}

Response body:
{
 "statusCode": 200,
 "Status": <boolean>,
 "BlogSubject": <Title of the blog you just created>,
 "Error": str / null,
 "Description": str
}
  • Delete blog:
Request body:
{
  "Token": <Token>,
  "Action": "D",
  "BlogSubject": "First Blog",
  "BlogBody": null,
  "Location": null,
  "Date": null,
  "Time": null,
  "Comment": null
}

Response body:
{
  "statusCode": 200,
  "Status": <boolean>,
  "BlogSubject": null,
  "Error": str / null,
  "Description": str,
  "BlogsDB": null
}
  • Add comment to a blog:
Request body:
{
  "Token": <Token>,
  "Action": "Q",
  "BlogSubject": "First Blog",
  "BlogBody": null,
  "Location": null,
  "Date": null,
  "Time": null,
  "Comment": "Hello this is my first comment"
}

Response body:
{
  "statusCode": 200,
  "Status": <boolean>,
  "BlogSubject": null,
  "Error": str / null,
  "Description": str,
  "BlogsDB": null
}
  • Get all blogs:
Request body:
{
  "Token": <Token>,
  "Action": "R",
  "BlogSubject": null,
  "BlogBody": null,
  "Location": null,
  "Date": null,
  "Time": null,
  "Comment": null
}

Response body:
{
  "statusCode": 200,
  "Status": <boolean>,
  "BlogSubject": null,
  "Error": str / null,
  "Description": "All blog from database",
  "BlogDB": [dicts]
}

devbops_blog_microservice's People

Contributors

hrgutou avatar

Watchers

 avatar  avatar

Forkers

francisrega

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.