Skip to content

Instantly share code, notes, and snippets.

@tavareshenrique
Last active May 30, 2020 20:27
Show Gist options
  • Save tavareshenrique/64e15f44414c756fba8db449709768c4 to your computer and use it in GitHub Desktop.
Save tavareshenrique/64e15f44414c756fba8db449709768c4 to your computer and use it in GitHub Desktop.
My README API Model

{PROJECT_LOGO(300X300)}

Last commit on GitHub Made by Henrique Tavares Project top programing language Repository size GitHub license

ℹ️ Content   |    🚀 Technologies   |    💻 Author   |    📝 License

Run in Insomnia

{DESCRIPTION}


ℹ️ Content


User

List All Users

ListAll Users.

  • URL

    /user

  • Method:

    GET

  • URL Params

    Required:

    None

    Optional:

  • Data Params

    None

  • Success Response:

    • Code: 200
      Content:

      [
        {
          "id": 1,
          "name": "Henrique Tavares",
          "email": "ihenrits@gmail.com",
          "avatar_id": null,
          "avatar": null
        }
      ]

Store User

Create a single user.

  • URL

    /users

  • Method:

    POST

  • URL Params

    Required:

    None

  • Data Params

    {
      "name": "FastFeet",
      "email": "admin@fastfeet.com",
      "password": "123456"
    }
  • Success Response:

    • Code: 200
      Content:

      {
        "name": "FastFeet",
        "email": "admin@fastfeet.com",
      }

Update User

Update a user.

  • URL

    /users

  • Method:

    PUT

  • URL Params

    Required:

    None

  • Data Params

    * Need Authorization - Bearer Token

    {
      "name": "Henrique Tavares",
      "email": "ihenrits@gmail.com",
    }
  • Success Response:

    • Code: 200
      Content:

      {
        "id": 1,
        "name": "Henrique Tavares",
        "email": "ihenrits@gmail.com"
      }

Delete User

Delete User.

  • URL

    /user/:id

  • Method:

    DELETE

  • URL Params

    Required:

    None

  • Data Params

    * Need Authorization - Bearer Token

    None

  • Success Response:

    • Code: 200
      Content: No body returned for response

🚀 Technologies


💻 Author

Henrique Tavares
Henrique Tavares

@tavareshenrique
💻

📝 License

This project is licensed under the MIT license - see the archive LICENSE.md for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment