Giter Club home page Giter Club logo

weblog_api's Introduction

This is a doc for API

endpoint

Call me to get real EndPoints


Posts EndPoint Setting

For Get All Posts From API:

  • Method : GET
  • Parameters : Nothing ()
  • Get Posts in Json "data"
Example :
id image title description body status created_at
1 ./assets/img/1.png This is a test title this is a test description this is a test body Enable 2023/11/24

id is: Post Uniqe id | Type is: integer (numeric)
image is: Post image address | string
title is : Post title | Type is : string
description is : Post Description | Type is : string
body is : Post main text | Type is : string
status is: Enable or Disable (Show or not show to the user) | Type is: Enum
created_at is : Time of created Post | Type is : timestamps

{ Action: Return Every Posts }


Add New Post From API:

  • Method : POST
  • Parameters : json

Example:

{
  "image" : "./assets/images/img.png",
  "title" : "this is a test title from api test for change with post method",
  "description" : "this is a test description from api test for change with post method",
  "body" : "this is a test body from api test for change with post method",
  "status" : "Enable"
}

parameters name is doing

Send this json to EndPoint Posts With POST Method

{Action: Add New Post With Your Data send}


Delete Post From API:

  • Method : DELETE
  • Parameters : json

Example:

{
  "id": 1
}

"id" => Post id for delete this id | numeric

Send this json to EndPoint Posts With DELETE Method

{Action: Delete Post where id send}





Users EndPoint Setting

For Get All Users From API:

  • Method : GET
  • Parameters : ?token=YOUR_API_TOKEN
  • Get Posts in Json "data"
Example :
id name email phone password created_at
1 zmat2411 [email protected] 09032142424 654c5s6d4cfsdf 2023/11/24

id is : User Uniqe id | Type is : intger (numeric)
name is : Username | string
email is : User Email | Type is : string
phone is : User Phone number | Type is : string
password is : User password | Type is : Hash_md5 - string
created_at is : Time of register User | Type is : timestamps

{ Action: Return Every Users }


Add New User From API:

  • Method : POST
  • Parameters : ?token=YOUR_API_TOKEN || json

Example:

{
  "id": "4",
  "name": "test",
  "email": "test@[email protected]",
  "phone": "09032142525",
  "password": "654c5s6d4cfsdf"
}

!! Created_at Automatically Add now time !!

Send this json to EndPoint Users With POST Method

{Action: Add New User With Your Data send}


Delete User From API:

  • Method : DELETE
  • Parameters : ?token=YOUR_API_TOKEN || json

Example:

{
  "id": 1
}

"id" => User id for delete this id | numeric

Send this json to EndPoint users With DELETE Method

{Action: Delete Post where id send}



weblog_api's People

Contributors

matinsoleymni avatar

Stargazers

mojtaba mollaei avatar  avatar Sajad Tavousi avatar MehranSheyhki avatar Zeynab Khayyati avatar  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.