nandonathaniel / blogpost-api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

API DOC

Model Blogpost has 4 attributes. There are id, title, description, created_at. Id is the primary key. title is the title of the post. ** description** is the description of the post. created_at is the time when the post is created. There is one extra attribute, many_post (that not stored in the DB) which means the order number of that post ($1,2, ...,n$) according from the oldest to the newest.

  • HTTP Request : GET Return the list of posts whichwill return the list of posts which contains all 5 attributes (including many_post)
  • HTTP Request : POST POST will create a new post, you will have to put the data consisting of title and description only because the id and created_at will be auto generated by Django.
  • HTTP Request : GET Return the post with that id which contains 4 main attributes.

  • HTTP Request : PUT Updating that post with that id, so you need store title and description

  • HTTP Request : DELETE Delete that post with that id

About


Languages

Language:Python 100.0%