Api::V1::Neighborhoods::ChatMessagesController API

Chat messages

Non members can see chat_messages

GET /api/v1/neighborhoods/:neighborhood_id/chat_messages

Parameters

Name Description
token token
neighborhood_id neighborhood

Request

Headers

Content-Type: application/json
Host: example.org
Cookie: 

Route

GET /api/v1/neighborhoods/2/chat_messages?token=foobar86

Query Parameters

token: foobar86

Response

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Permitted-Cross-Domain-Policies: none
Referrer-Policy: strict-origin-when-cross-origin
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET,POST,PUT,PATCH,DELETE
Access-Control-Allow-Headers: Origin,Accept,Content-Type,X-Requested-With,X-CSRF-Token,X-API-KEY
Content-Type: application/json; charset=utf-8
ETag: W/"bc9e07c21b08f195238529689d292ab8"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 4583b74c-eda0-42fb-82b1-bb4627167200
X-Runtime: 0.010138
Content-Length: 273

Status

200 OK

Body

{
  "chat_messages": [
    {
      "id": 5,
      "content": "MyText",
      "user": {
        "id": 87,
        "avatar_url": null,
        "display_name": "John D.",
        "partner": null
      },
      "created_at": "2022-06-02T17:16:44.593+02:00",
      "message_type": "text",
      "post_id": null,
      "has_comments": false,
      "comments_count": 0,
      "image_url": null,
      "read": null
    }
  ]
}