Omniplex Docs

Reviews

These API endpoints are related to reviews on Omniplex

Get Reviews

GET
/{target_type}/{target_id}/reviews

Gets the reviews of a bot by its ID or vanity.

Authorization

User
headerUser-Auth<token>

Requires a user token. Should be prefixed with User in Authorization header.

Path Parameters

target_type*string

The target type of the entity

target_id*string

The target ID of the entity

Response Body

Success

application/json
  1. response
reviews?array<>
Example Request
curl -X GET 'https://spider.omniplex.gg/string/string/reviews'
Example Response
{  "reviews": [    {      "author": {        "avatar": "string",        "bot": true,        "display_name": "string",        "extra_data": {          "property1": null,          "property2": null        },        "flags": [          "string"        ],        "id": "string",        "status": "string",        "username": "string"      },      "content": "string",      "created_at": "2019-08-24T14:15:22Z",      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "owner_review": true,      "parent_id": "1c6ca187-e61f-4301-8dcb-0e9749e89eef",      "stars": 0,      "target_id": "string",      "target_type": "string"    }  ]}

Create Review

POST
/{target_type}/{target_id}/reviews

Creates a new review for an entity. A user may have only one root review per entity. Triggers a garbage collection step to remove any orphaned reviews afterwards. Note that non-users can only create an 'owner review'. Returns 204 on success

Authorization

headerUser-Auth<token>

Requires a user token. Should be prefixed with User in Authorization header.

Path Parameters

target_type*string

The target type of the entity

target_id*string

The target ID of the entity

Request Body

application/json
  1. body
content?string
owner_review?boolean

Whether or not the review is an owner review

parent_id?string
stars?integer
Formatint32

Response Body

Success

application/json
  1. response
context?

Context of the error. Usually used for validation error contexts

message?string

Message of the error

Example Request
curl -X POST 'https://spider.omniplex.gg/string/string/reviews' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "context": {    "property1": "string",    "property2": "string"  },  "message": "string"}

Edit Review

PATCH
/{target_type}/{target_id}/reviews/{review_id}

Edits a review by review ID. The user must be the author of this review. This will automatically trigger a garbage collection task. Note that non-users can only edit 'owner review's. Returns 204 on success

Authorization

headerUser-Auth<token>

Requires a user token. Should be prefixed with User in Authorization header.

Path Parameters

target_type*string

The target type of the entity

target_id*string

The target ID of the entity

review_id*string

The review ID of the entity

Request Body

application/json
  1. body
content?string
stars?integer
Formatint32

Response Body

Success

application/json
  1. response
context?

Context of the error. Usually used for validation error contexts

message?string

Message of the error

Example Request
curl -X PATCH 'https://spider.omniplex.gg/string/string/reviews/string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "context": {    "property1": "string",    "property2": "string"  },  "message": "string"}

Delete Review

DELETE
/{target_type}/{target_id}/reviews/{review_id}

Deletes a review by review ID. The user must be the author of this review. This will automatically trigger a garbage collection task and returns 204 on success

Authorization

headerUser-Auth<token>

Requires a user token. Should be prefixed with User in Authorization header.

Path Parameters

target_type*string

The target type of the entity

target_id*string

The target ID of the entity

review_id*string

The review ID of the entity

Response Body

Success

application/json
  1. response
context?

Context of the error. Usually used for validation error contexts

message?string

Message of the error

Example Request
curl -X DELETE 'https://spider.omniplex.gg/string/string/reviews/string'
Example Response
{  "context": {    "property1": "string",    "property2": "string"  },  "message": "string"}