BandSite API Documentation

Overview


Authentication

Routes

GET /register

Response Body Example

{
      "api_key": "e0eea5f0-0f8c-4b54-9fc4-ff50843766d4"
  }
  

GET /comments

Response Body Example

[
      {
          "name": "Nigel",
          "comment": "What a great band.",
          "id": 3d3b63fa-a78d-468a-a50f-57429984dd99,
          "likes": 0,
          "timestamp": 1705084427000
      }
  ]
  

GET /showdates

Response Body Example

[
    {
      "id": 968f0fd7-8e28-4091-93ad-537d5e36ec17,
      "date": 1725854400000,
      "place": "Ronald Lane",
      "location": "San Francisco, CA"
    },
    {
      "id": 9086b443-bb36-4e1b-8112-1cd102b23a66,
      "date": 1726545600000,
      "place": "Pier 3 East",
      "location": "San Francisco, CA"
    }
  ]
  

POST /comments

Required Request Headers

Content-Type: application/json

POST Body Example

{
      "name": "Nigel",
      "comment": "What a great band."
  }
  

Response Body Example

{
      "name": "Nigel",
      "comment": "What a great band.",
      "id": 3d3b63fa-a78d-468a-a50f-57429984dd99,
      "likes": 0,
      "timestamp": 1705084427000
  }
  

Diving Deeper

Note: The following endpoints are not required to satisfy the assignment requirements:

PUT /comments/:id/like

Response Body Example

{
    "name": "Nigel",
    "comment": "What a cool site",
    "id": 3d3b63fa-a78d-468a-a50f-57429984dd99,
    "likes": 1,
    "timestamp": 1530744795832
}

DELETE /comments/:id

Response Body Example

{
    "name": "Nigel",
    "comment": "What a cool site",
    "id": 3d3b63fa-a78d-468a-a50f-57429984dd99,
    "likes": 0,
    "timestamp": 1530744795832
}