Giter VIP home page Giter VIP logo

fastfakeapi's Introduction

API Usage Guide

This API provides endpoints to perform CRUD operations on JSON files.

How to Use

To use this API, you can send HTTP requests to the following endpoints:

Installation Guide

Clone Source from GitHub

Clone Source from GitHub

How to Use

To use this API, you can send HTTP requests to the following endpoints:

Retrieve object information from JSON file

  • Endpoint: GET /:type/:id
  • Description: Fetch information about an object from a JSON file based on type and id.
  • Example: /users/1 will return information about the user with ID 1.

Retrieve data of a single user from JSON file

  • Endpoint: GET /users/:id
  • Description: Fetch data of a single user from the JSON file based on the user id.
  • Example: /users/1 will retrieve data of the user with ID 1.

Retrieve data of a single post from JSON file

  • Endpoint: GET /posts/:id
  • Description: Fetch data of a single post from the JSON file based on the post id.
  • Example: /posts/1 will retrieve data of the post with ID 1.

Retrieve data of a single product from JSON file

  • Endpoint: GET /products/:id
  • Description: Fetch data of a single product from the JSON file based on the product id.
  • Example: /products/1 will retrieve data of the product with ID 1.

Add a new object to the JSON file

  • Endpoint: POST /:type
  • Description: Add a new object to the JSON file based on type.
  • Request data: Data of the object to be added.
  • Example: /users with user data to add a new user.

Update object information in the JSON file

  • Endpoint: PUT /:type/:id
  • Description: Update information of an object in the JSON file based on type and id.
  • Request data: New data of the object to be updated.
  • Example: /users/1 with updated user data to modify the information of the user with ID 1.

Delete an object from the JSON file

  • Endpoint: DELETE /:type/:id
  • Description: Delete an object from the JSON file based on type and id.
  • Example: /users/1 to delete the user with ID 1.

Example Product Structure

Here's an example structure for a product in product.json:

{
  "id": 1,
  "name": "Product Name",
  "description": "Product Description",
  "price": 29.99,
  "category": "Electronics"
}

fastfakeapi's People

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.