REST interface for the social networking library (comments).
Create a new comment to a post having as owner the auth token's owner
| name | type | description |
|---|---|---|
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| Content-Type | header | application/json |
| media type | data type |
|---|---|
| application/json | CommentInputBean (JSON) |
| code | condition |
|---|---|
| 201 | Successfull created, the new comment is reported in the 'result' field of the returned object |
| 500 | The error is reported into the 'message' field of the returned object |
| media type | data type | description |
|---|---|---|
| application/json | object (JSON) |
POST /2/comments/comment-post
Content-Type: application/json
Accept: application/json
Authorization: ...
{
"text" : "I would like to comment that ...",
"postid" : "..."
}
HTTP/1.1 201 Created
Content-Type: application/json
...
| name | type | description | constraints |
|---|---|---|---|
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources | |
| Content-Type | header | application/json | |
| key | query | required |
| code | condition |
|---|---|
| 200 | The list of comments is put into the 'result' field |
| 500 | The error is reported into the 'message' field of the returned object |
| media type | data type | description |
|---|---|---|
| application/json | object (JSON) |
GET /2/comments/get-comments-by-post-id
Content-Type: */*
Accept: application/json
Authorization: ...
...
HTTP/1.1 200 OK
Content-Type: application/json
...
| name | type | description |
|---|---|---|
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| Content-Type | header | application/json |
| code | condition |
|---|---|
| 200 | The list of comments is put into the 'result' field |
| 500 | The error is reported into the 'message' field of the returned object |
| media type | data type | description |
|---|---|---|
| application/json | object (JSON) |
GET /2/comments/get-comments-user
Content-Type: */*
Accept: application/json
Authorization: ...
...
HTTP/1.1 200 OK
Content-Type: application/json
...
| name | type | description | constraints |
|---|---|---|---|
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources | |
| Content-Type | header | application/json | |
| time | query | required long, min: 0 |
| media type | data type | description |
|---|---|---|
| application/json | object (JSON) |
GET /2/comments/get-comments-user-by-time
Content-Type: */*
Accept: application/json
Authorization: ...
...
HTTP/1.1 200 OK
Content-Type: application/json
...