Code Monkey home page Code Monkey logo

go-final-mygram-teguh's Introduction

MyGram Final Bootcamp Golang Project

  • Run postman documentation

[Postman Documentation

Authentication

  • HTTP Authentication, scheme: bearer

Photo

POST Create Photo

POST /photos

Body Parameters

title: Beach
photo_url: https://images.unsplash.com/photo-1707343843598-39755549ac9a?q=80&w=2832&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDF8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D
caption: Foto Pantai

Params

Name Location Type Required Description
body body object no none
» title body string yes none
» photo_url body string yes none
» caption body string yes none

Response Examples

Create First Photo

{
  "ID": 1,
  "CreatedAt": "2024-02-16T09:20:56.460191+07:00",
  "UpdatedAt": "2024-02-16T09:20:56.460191+07:00",
  "DeletedAt": null,
  "title": "Foto Pertama",
  "photo_url": "https://images.unsplash.com/photo-1679065949530-7bb1fba3ccb3?q=80&w=2787&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
  "caption": "ini adalah foto pertama aink cuy",
  "UserID": 1,
  "User": null
}

Responses

HTTP Status Code Meaning Description Data schema
201 Created Create First Photo Inline

Responses Data Schema

HTTP Status Code 201

Name Type Required Restrictions Title description
» ID integer true none none
» CreatedAt string true none none
» UpdatedAt string true none none
» DeletedAt null true none none
» title string true none none
» photo_url string true none none
» caption string true none none
» UserID integer true none none
» User null true none none

GET Get All Photo

GET /photos

Response Examples

Success Get All Photo

[
  {
    "ID": 1,
    "CreatedAt": "2024-02-16T09:20:56.460191+07:00",
    "UpdatedAt": "2024-02-16T09:20:56.460191+07:00",
    "DeletedAt": null,
    "title": "Foto Pertama",
    "photo_url": "https://images.unsplash.com/photo-1679065949530-7bb1fba3ccb3?q=80&w=2787&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
    "caption": "ini adalah foto pertama aink cuy",
    "UserID": 1,
    "User": null
  },
  {
    "ID": 2,
    "CreatedAt": "2024-02-16T09:23:28.78337+07:00",
    "UpdatedAt": "2024-02-16T09:23:28.78337+07:00",
    "DeletedAt": null,
    "title": "Beach",
    "photo_url": "https://images.unsplash.com/photo-1707343843598-39755549ac9a?q=80&w=2832&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDF8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
    "caption": "Foto Pantai",
    "UserID": 1,
    "User": null
  }
]

Failed not login

{
  "error_message": "sign in to proceed",
  "error_status": "Unauthorized"
}

Responses

HTTP Status Code Meaning Description Data schema
201 Created Success Get All Photo Inline
401 Unauthorized Failed not login Inline

Responses Data Schema

HTTP Status Code 201

Name Type Required Restrictions Title description
» ID integer true none none
» CreatedAt string true none none
» UpdatedAt string true none none
» DeletedAt null true none none
» title string true none none
» photo_url string true none none
» caption string true none none
» UserID integer true none none
» User null true none none

HTTP Status Code 401

Name Type Required Restrictions Title description
» error_message string true none none
» error_status string true none none

GET Get One Photo

GET /photos/1

Response Examples

Get One Photo

{
  "ID": 1,
  "CreatedAt": "2024-02-16T09:20:56.460191+07:00",
  "UpdatedAt": "2024-02-16T09:20:56.460191+07:00",
  "DeletedAt": null,
  "title": "Foto Pertama",
  "photo_url": "https://images.unsplash.com/photo-1679065949530-7bb1fba3ccb3?q=80&w=2787&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
  "caption": "ini adalah foto pertama aink cuy",
  "UserID": 1,
  "User": null
}

Responses

HTTP Status Code Meaning Description Data schema
201 Created Get One Photo Inline

Responses Data Schema

HTTP Status Code 201

Name Type Required Restrictions Title description
» ID integer true none none
» CreatedAt string true none none
» UpdatedAt string true none none
» DeletedAt null true none none
» title string true none none
» photo_url string true none none
» caption string true none none
» UserID integer true none none
» User null true none none

PUT Update Photo

PUT /photos/1

Body Parameters

title: Judulnya ganti
caption: Captionnya ganti
photo_url: https://images.unsplash.com/photo-1707696199186-d26b0f779f30?q=80&w=1828&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D

Params

Name Location Type Required Description
body body object no none
» title body string yes none
» caption body string yes none
» photo_url body string yes none

Response Examples

Update Photo

{
  "ID": 1,
  "CreatedAt": "0001-01-01T00:00:00Z",
  "UpdatedAt": "2024-02-16T09:34:12.39539+07:00",
  "DeletedAt": null,
  "title": "Judulnya ganti",
  "photo_url": "https://images.unsplash.com/photo-1707696199186-d26b0f779f30?q=80&w=1828&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
  "caption": "Captionnya ganti",
  "UserID": 1,
  "User": null
}

Responses

HTTP Status Code Meaning Description Data schema
201 Created Update Photo Inline

Responses Data Schema

HTTP Status Code 201

Name Type Required Restrictions Title description
» ID integer true none none
» CreatedAt string true none none
» UpdatedAt string true none none
» DeletedAt null true none none
» title string true none none
» photo_url string true none none
» caption string true none none
» UserID integer true none none
» User null true none none

DELETE Delete Photo

DELETE /photos/3

Response Examples

Delete Photo

{
  "message": "photo with id 3 has been successfully deleted"
}

Responses

HTTP Status Code Meaning Description Data schema
201 Created Delete Photo Inline

Responses Data Schema

HTTP Status Code 201

Name Type Required Restrictions Title description
» message string true none none

User

POST Register MyGram

POST /users/register

Body Parameters

username: farras
email: [email protected]
password: "123456"
age: "26"

Params

Name Location Type Required Description
body body object no none
» username body string yes none
» email body string yes none
» password body string yes none
» age body string yes none

Response Examples

Register MyGram

{
  "age": 26,
  "email": "[email protected]",
  "id": 2,
  "username": "farras"
}

Failed Register MyGram

{
  "error": "Bad Request",
  "message": "Age must be greater than 8"
}

Responses

HTTP Status Code Meaning Description Data schema
201 Created Register MyGram Inline
400 Bad Request Failed Register MyGram Inline

Responses Data Schema

HTTP Status Code 201

Name Type Required Restrictions Title description
» age integer true none none
» email string true none none
» id integer true none none
» username string true none none

HTTP Status Code 400

Name Type Required Restrictions Title description
» error string true none none
» message string true none none

POST Login MyGram

POST /users/login

Body Parameters

email: [email protected]
password: "123456"

Params

Name Location Type Required Description
body body object no none
» email body string yes none
» password body string yes none

Response Examples

Login MyGram

{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImFsZmFAbWFpbC5jb20iLCJpZCI6MX0.CruDbZWyA_ygWV_1TwVEwwBR8n26V7ePvNcI5vWtSVg"
}

Responses

HTTP Status Code Meaning Description Data schema
200 OK Login MyGram Inline

Responses Data Schema

HTTP Status Code 200

Name Type Required Restrictions Title description
» token string true none none

Comment

POST Post Comment

POST /comments/1

Body Parameters

message: coba comment foto pertama

Params

Name Location Type Required Description
body body object no none
» message body string yes none

Response Examples

Post Comment

{
  "ID": 18,
  "CreatedAt": "2024-02-16T10:44:31.243673+07:00",
  "UpdatedAt": "2024-02-16T10:44:31.243673+07:00",
  "DeletedAt": null,
  "message": "coba comment foto pertama",
  "UserID": 1,
  "User": null,
  "PhotoID": 1,
  "Photo": null
}

Responses

HTTP Status Code Meaning Description Data schema
201 Created Post Comment Inline

Responses Data Schema

HTTP Status Code 201

Name Type Required Restrictions Title description
» ID integer true none none
» CreatedAt string true none none
» UpdatedAt string true none none
» DeletedAt null true none none
» message string true none none
» UserID integer true none none
» User null true none none
» PhotoID integer true none none
» Photo null true none none

GET Get All Comment

GET /comments

Body Parameters

{}

Params

Name Location Type Required Description
body body object no none

Response Examples

Get All Comment

{
  "comments": [
    {
      "ID": 14,
      "CreatedAt": "2024-02-16T10:36:28.712273+07:00",
      "UpdatedAt": "2024-02-16T10:36:28.712273+07:00",
      "DeletedAt": null,
      "message": "coba comment foto pertama",
      "UserID": 1,
      "User": {
        "ID": 1,
        "CreatedAt": "2024-02-13T16:18:36.717295+07:00",
        "UpdatedAt": "2024-02-13T16:18:36.717295+07:00",
        "DeletedAt": null,
        "username": "alfa",
        "email": "[email protected]",
        "password": "$2a$08$xunMy1yQGACQSwKTzwWusuCM1v4c13IlQKXkxEpfoez93JqYC4ndm",
        "age": 9,
        "photos": null,
        "comments": null,
        "social_media": null
      },
      "PhotoID": 1,
      "Photo": {
        "ID": 1,
        "CreatedAt": "2024-02-16T09:20:56.460191+07:00",
        "UpdatedAt": "2024-02-16T09:34:12.39539+07:00",
        "DeletedAt": null,
        "title": "Judulnya ganti",
        "photo_url": "https://images.unsplash.com/photo-1707696199186-d26b0f779f30?q=80&w=1828&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
        "caption": "Captionnya ganti",
        "UserID": 1,
        "User": null
      }
    },
    {
      "ID": 16,
      "CreatedAt": "2024-02-16T10:42:44.593117+07:00",
      "UpdatedAt": "2024-02-16T11:04:04.363957+07:00",
      "DeletedAt": null,
      "message": "Update comment dulu",
      "UserID": 1,
      "User": {
        "ID": 1,
        "CreatedAt": "2024-02-13T16:18:36.717295+07:00",
        "UpdatedAt": "2024-02-13T16:18:36.717295+07:00",
        "DeletedAt": null,
        "username": "alfa",
        "email": "[email protected]",
        "password": "$2a$08$xunMy1yQGACQSwKTzwWusuCM1v4c13IlQKXkxEpfoez93JqYC4ndm",
        "age": 9,
        "photos": null,
        "comments": null,
        "social_media": null
      },
      "PhotoID": 1,
      "Photo": {
        "ID": 1,
        "CreatedAt": "2024-02-16T09:20:56.460191+07:00",
        "UpdatedAt": "2024-02-16T09:34:12.39539+07:00",
        "DeletedAt": null,
        "title": "Judulnya ganti",
        "photo_url": "https://images.unsplash.com/photo-1707696199186-d26b0f779f30?q=80&w=1828&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
        "caption": "Captionnya ganti",
        "UserID": 1,
        "User": null
      }
    },
    {
      "ID": 17,
      "CreatedAt": "2024-02-16T10:42:47.696695+07:00",
      "UpdatedAt": "2024-02-16T10:42:47.696695+07:00",
      "DeletedAt": null,
      "message": "coba comment foto pertama",
      "UserID": 1,
      "User": {
        "ID": 1,
        "CreatedAt": "2024-02-13T16:18:36.717295+07:00",
        "UpdatedAt": "2024-02-13T16:18:36.717295+07:00",
        "DeletedAt": null,
        "username": "alfa",
        "email": "[email protected]",
        "password": "$2a$08$xunMy1yQGACQSwKTzwWusuCM1v4c13IlQKXkxEpfoez93JqYC4ndm",
        "age": 9,
        "photos": null,
        "comments": null,
        "social_media": null
      },
      "PhotoID": 1,
      "Photo": {
        "ID": 1,
        "CreatedAt": "2024-02-16T09:20:56.460191+07:00",
        "UpdatedAt": "2024-02-16T09:34:12.39539+07:00",
        "DeletedAt": null,
        "title": "Judulnya ganti",
        "photo_url": "https://images.unsplash.com/photo-1707696199186-d26b0f779f30?q=80&w=1828&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
        "caption": "Captionnya ganti",
        "UserID": 1,
        "User": null
      }
    },
    {
      "ID": 18,
      "CreatedAt": "2024-02-16T10:44:31.243673+07:00",
      "UpdatedAt": "2024-02-16T10:44:31.243673+07:00",
      "DeletedAt": null,
      "message": "coba comment foto pertama",
      "UserID": 1,
      "User": {
        "ID": 1,
        "CreatedAt": "2024-02-13T16:18:36.717295+07:00",
        "UpdatedAt": "2024-02-13T16:18:36.717295+07:00",
        "DeletedAt": null,
        "username": "alfa",
        "email": "[email protected]",
        "password": "$2a$08$xunMy1yQGACQSwKTzwWusuCM1v4c13IlQKXkxEpfoez93JqYC4ndm",
        "age": 9,
        "photos": null,
        "comments": null,
        "social_media": null
      },
      "PhotoID": 1,
      "Photo": {
        "ID": 1,
        "CreatedAt": "2024-02-16T09:20:56.460191+07:00",
        "UpdatedAt": "2024-02-16T09:34:12.39539+07:00",
        "DeletedAt": null,
        "title": "Judulnya ganti",
        "photo_url": "https://images.unsplash.com/photo-1707696199186-d26b0f779f30?q=80&w=1828&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
        "caption": "Captionnya ganti",
        "UserID": 1,
        "User": null
      }
    },
    {
      "ID": 19,
      "CreatedAt": "2024-02-16T10:51:25.601451+07:00",
      "UpdatedAt": "2024-02-16T10:51:25.601451+07:00",
      "DeletedAt": null,
      "message": "Komentar kedua nih",
      "UserID": 1,
      "User": {
        "ID": 1,
        "CreatedAt": "2024-02-13T16:18:36.717295+07:00",
        "UpdatedAt": "2024-02-13T16:18:36.717295+07:00",
        "DeletedAt": null,
        "username": "alfa",
        "email": "[email protected]",
        "password": "$2a$08$xunMy1yQGACQSwKTzwWusuCM1v4c13IlQKXkxEpfoez93JqYC4ndm",
        "age": 9,
        "photos": null,
        "comments": null,
        "social_media": null
      },
      "PhotoID": 1,
      "Photo": {
        "ID": 1,
        "CreatedAt": "2024-02-16T09:20:56.460191+07:00",
        "UpdatedAt": "2024-02-16T09:34:12.39539+07:00",
        "DeletedAt": null,
        "title": "Judulnya ganti",
        "photo_url": "https://images.unsplash.com/photo-1707696199186-d26b0f779f30?q=80&w=1828&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
        "caption": "Captionnya ganti",
        "UserID": 1,
        "User": null
      }
    }
  ]
}

Responses

HTTP Status Code Meaning Description Data schema
200 OK Get All Comment Inline

Responses Data Schema

HTTP Status Code 200

Name Type Required Restrictions Title description
» comments [object] true none none
»» ID integer true none none
»» CreatedAt string true none none
»» UpdatedAt string true none none
»» DeletedAt null true none none
»» message string true none none
»» UserID integer true none none
»» User object true none none
»»» ID integer true none none
»»» CreatedAt string true none none
»»» UpdatedAt string true none none
»»» DeletedAt null true none none
»»» username string true none none
»»» email string true none none
»»» password string true none none
»»» age integer true none none
»»» photos null true none none
»»» comments null true none none
»»» social_media null true none none
»» PhotoID integer true none none
»» Photo object true none none
»»» ID integer true none none
»»» CreatedAt string true none none
»»» UpdatedAt string true none none
»»» DeletedAt null true none none
»»» title string true none none
»»» photo_url string true none none
»»» caption string true none none
»»» UserID integer true none none
»»» User null true none none

DELETE Delete Comment

DELETE /comments/15

Response Examples

Delete Comment

{
  "message": "comment with id 15 has been successfully deleted"
}

Responses

HTTP Status Code Meaning Description Data schema
201 Created Delete Comment Inline

Responses Data Schema

HTTP Status Code 201

Name Type Required Restrictions Title description
» message string true none none

PUT Update Comment

PUT /comments/16

Body Parameters

message: Update comment dulu

Params

Name Location Type Required Description
body body object no none
» message body string yes none

Response Examples

Update Comment

{
  "ID": 16,
  "CreatedAt": "0001-01-01T00:00:00Z",
  "UpdatedAt": "2024-02-16T11:04:04.363957+07:00",
  "DeletedAt": null,
  "message": "Update comment dulu",
  "UserID": 1,
  "User": null,
  "PhotoID": 0,
  "Photo": null
}

Responses

HTTP Status Code Meaning Description Data schema
201 Created Update Comment Inline

Responses Data Schema

HTTP Status Code 201

Name Type Required Restrictions Title description
» ID integer true none none
» CreatedAt string true none none
» UpdatedAt string true none none
» DeletedAt null true none none
» message string true none none
» UserID integer true none none
» User null true none none
» PhotoID integer true none none
» Photo null true none none

GET Get One Comment

GET /comments/14

Body Parameters

{}

Params

Name Location Type Required Description
body body object no none

Response Examples

Get One Comment

{
  "comment": {
    "ID": 14,
    "CreatedAt": "2024-02-16T10:36:28.712273+07:00",
    "UpdatedAt": "2024-02-16T10:36:28.712273+07:00",
    "DeletedAt": null,
    "message": "coba comment foto pertama",
    "UserID": 1,
    "User": {
      "ID": 1,
      "CreatedAt": "2024-02-13T16:18:36.717295+07:00",
      "UpdatedAt": "2024-02-13T16:18:36.717295+07:00",
      "DeletedAt": null,
      "username": "alfa",
      "email": "[email protected]",
      "password": "$2a$08$xunMy1yQGACQSwKTzwWusuCM1v4c13IlQKXkxEpfoez93JqYC4ndm",
      "age": 9,
      "photos": null,
      "comments": null,
      "social_media": null
    },
    "PhotoID": 1,
    "Photo": {
      "ID": 1,
      "CreatedAt": "2024-02-16T09:20:56.460191+07:00",
      "UpdatedAt": "2024-02-16T09:34:12.39539+07:00",
      "DeletedAt": null,
      "title": "Judulnya ganti",
      "photo_url": "https://images.unsplash.com/photo-1707696199186-d26b0f779f30?q=80&w=1828&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
      "caption": "Captionnya ganti",
      "UserID": 1,
      "User": null
    }
  }
}

Responses

HTTP Status Code Meaning Description Data schema
200 OK Get One Comment Inline

Responses Data Schema

HTTP Status Code 200

Name Type Required Restrictions Title description
» comment object true none none
»» ID integer true none none
»» CreatedAt string true none none
»» UpdatedAt string true none none
»» DeletedAt null true none none
»» message string true none none
»» UserID integer true none none
»» User object true none none
»»» ID integer true none none
»»» CreatedAt string true none none
»»» UpdatedAt string true none none
»»» DeletedAt null true none none
»»» username string true none none
»»» email string true none none
»»» password string true none none
»»» age integer true none none
»»» photos null true none none
»»» comments null true none none
»»» social_media null true none none
»» PhotoID integer true none none
»» Photo object true none none
»»» ID integer true none none
»»» CreatedAt string true none none
»»» UpdatedAt string true none none
»»» DeletedAt null true none none
»»» title string true none none
»»» photo_url string true none none
»»» caption string true none none
»»» UserID integer true none none
»»» User null true none none

Social Media

POST Create Social Media

POST /socialmedias

Body Parameters

name: Alfa
social_media_url: [email protected]

Params

Name Location Type Required Description
body body object no none
» name body string yes none
» social_media_url body string yes none

Response Examples

Create Social Media

{
  "ID": 1,
  "CreatedAt": "2024-02-16T11:32:53.000673+07:00",
  "UpdatedAt": "2024-02-16T11:32:53.000673+07:00",
  "DeletedAt": null,
  "name": "Alfa",
  "social_media_url": "[email protected]",
  "UserID": 1,
  "User": null
}

Responses

HTTP Status Code Meaning Description Data schema
201 Created Create Social Media Inline

Responses Data Schema

HTTP Status Code 201

Name Type Required Restrictions Title description
» ID integer true none none
» CreatedAt string true none none
» UpdatedAt string true none none
» DeletedAt null true none none
» name string true none none
» social_media_url string true none none
» UserID integer true none none
» User null true none none

GET Get All Social Media

GET /socialmedias

Response Examples

Get All Social Media

[
  {
    "ID": 1,
    "CreatedAt": "2024-02-16T11:32:53.000673+07:00",
    "UpdatedAt": "2024-02-16T11:32:53.000673+07:00",
    "DeletedAt": null,
    "name": "Alfa",
    "social_media_url": "[email protected]",
    "UserID": 1,
    "User": null
  },
  {
    "ID": 2,
    "CreatedAt": "2024-02-16T12:03:01.119968+07:00",
    "UpdatedAt": "2024-02-16T12:03:01.119968+07:00",
    "DeletedAt": null,
    "name": "anjoy",
    "social_media_url": "[email protected]",
    "UserID": 1,
    "User": null
  },
  {
    "ID": 3,
    "CreatedAt": "2024-02-16T12:03:13.324375+07:00",
    "UpdatedAt": "2024-02-16T12:05:06.03972+07:00",
    "DeletedAt": null,
    "name": "bimo",
    "social_media_url": "[email protected]",
    "UserID": 1,
    "User": null
  }
]

Responses

HTTP Status Code Meaning Description Data schema
201 Created Get All Social Media Inline

Responses Data Schema

HTTP Status Code 201

Name Type Required Restrictions Title description
» ID integer true none none
» CreatedAt string true none none
» UpdatedAt string true none none
» DeletedAt null true none none
» name string true none none
» social_media_url string true none none
» UserID integer true none none
» User null true none none

GET Get One Social Media

GET /socialmedias/1

Response Examples

Get One Social Media

{
  "ID": 1,
  "CreatedAt": "2024-02-16T11:32:53.000673+07:00",
  "UpdatedAt": "2024-02-16T11:32:53.000673+07:00",
  "DeletedAt": null,
  "name": "Alfa",
  "social_media_url": "[email protected]",
  "UserID": 1,
  "User": null
}

Responses

HTTP Status Code Meaning Description Data schema
201 Created Get One Social Media Inline

Responses Data Schema

HTTP Status Code 201

Name Type Required Restrictions Title description
» ID integer true none none
» CreatedAt string true none none
» UpdatedAt string true none none
» DeletedAt null true none none
» name string true none none
» social_media_url string true none none
» UserID integer true none none
» User null true none none

PUT Update Social Media

PUT /socialmedias/3

Body Parameters

name: bimo
social_media_url: [email protected]

Params

Name Location Type Required Description
body body object no none
» name body string yes none
» social_media_url body string yes none

Response Examples

Update Social Media

{
  "ID": 3,
  "CreatedAt": "0001-01-01T00:00:00Z",
  "UpdatedAt": "2024-02-16T12:05:06.03972+07:00",
  "DeletedAt": null,
  "name": "bimo",
  "social_media_url": "[email protected]",
  "UserID": 1,
  "User": null
}

Responses

HTTP Status Code Meaning Description Data schema
201 Created Update Social Media Inline

Responses Data Schema

HTTP Status Code 201

Name Type Required Restrictions Title description
» ID integer true none none
» CreatedAt string true none none
» UpdatedAt string true none none
» DeletedAt null true none none
» name string true none none
» social_media_url string true none none
» UserID integer true none none
» User null true none none

DELETE Delete Social Media

DELETE /socialmedias/2

Response Examples

Delete Social Media

{
  "message": "socialmedia with id 2 has been successfully deleted"
}

Responses

HTTP Status Code Meaning Description Data schema
201 Created Delete Social Media Inline

Responses Data Schema

HTTP Status Code 201

Name Type Required Restrictions Title description
» message string true none none

go-final-mygram-teguh's People

Contributors

prabowoteguh 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.