Reviews API

Review is a note for educational content or collections, made by users.

Rating Review

POST /v1/:type/:id/reviews/:review_id/rate

Parameters

Name Description
id The id of object
type type of object ['learning_objects', 'collections']
review_id The id of review
approves If user likes the review or not.

Request

Headers

Accept: application/json
Content-Type: application/json
Access-Token: 59YPLInXEkaabkttKEDnYw
Client: Hx6fze_mh7lwt3t9ECfSGQ
Uid: jey_gusikowski@bogisich.org
Host: example.org
Cookie: 

Route

POST /v1/learning_objects/873/reviews/1745/rate

Body

{"approves":"true"}

cURL

curl "https://api.portalmec.c3sl.ufpr.br/v1/learning_objects/873/reviews/1745/rate" -d '{"approves":"true"}' -X POST \
	-H "Accept: application/json" \
	-H "Content-Type: application/json" \
	-H "Access-Token: 59YPLInXEkaabkttKEDnYw" \
	-H "Client: Hx6fze_mh7lwt3t9ECfSGQ" \
	-H "Uid: jey_gusikowski@bogisich.org"

Response

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Type: application/json; charset=utf-8
Set-Cookie: _session_id=RFRnL0tuNzV4anZNR3VQV2d4UlVTZHBPbDFvbmFVWnhEQUJiWTFHMllkYVRwVEt4WHU0MVlidW4rbGVkTEh1K0EwSGdoQTR2QXlsVXJIYXpNMkQxQmYvdEJKdzZZMHgwMnN1WDhmaENTNzdhaTU5VThFTGhUekhCNzBURDNFNGtCZENQazZEMzdaKzYrUDVZQ0QzK3FLdzlpL24zcmlFRCttdHZRMHVZY2lHWkp1RUhkR3BBUkpNdjlUK1dxT1F0LS1MMHo0MWtkcWxpR1QrMjFzNGdoZDZRPT0%3D--45babee00f757d11b23aa6e72cfb285a61ecddaf; path=/; HttpOnly
Vary: Origin
ETag: W/"6ed9d970e2c2444f4af72ae5145d18ac"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 4cacd32d-55e1-4581-89a6-e5f3e50f47f4
X-Runtime: 0.153888
Content-Length: 1529

Status

201 Created

Body

{
  "id": 1,
  "approves": true,
  "user": {
    "id": 7950,
    "email": "jey_gusikowski@bogisich.org",
    "created_at": "2019-03-08T13:48:08.767Z",
    "updated_at": "2019-03-08T13:48:08.879Z",
    "provider": "email",
    "uid": "jey_gusikowski@bogisich.org",
    "name": "Aline Conceição",
    "avatar_file_name": null,
    "avatar_content_type": null,
    "avatar_file_size": null,
    "avatar_updated_at": null,
    "bookmarks_count": 0,
    "user_category_id": null,
    "score": 0.0,
    "follows_count": 0,
    "deleted_at": null,
    "description": "Provident ut quam alias deleniti.",
    "likes_count": 0,
    "learning_objects_count": 0,
    "collections_count": 0,
    "nickname": null,
    "cover_file_name": null,
    "cover_content_type": null,
    "cover_file_size": null,
    "cover_updated_at": null,
    "education": "Atque occaecati quis quibusdam ut nihil saepe molestias.",
    "submitter_request": "default",
    "dspace_handle": null,
    "dspace_url": null,
    "dspace_sets": [

    ],
    "teacher_id": null,
    "birthday": null,
    "school_id": 7949,
    "terms_accepted_at": null,
    "cpf": null
  },
  "review": {
    "id": 1745,
    "name": "ratione",
    "description": "Sed tenetur id. Excepturi at vero est quae architecto. Est corrupti vel distinctio incidunt iure autem. Voluptatem nihil reprehenderit culpa dolor qui deleniti similique. Itaque eaque numquam dicta possimus incidunt.",
    "pros": "Aut est id nobis dolore veritatis suscipit.",
    "cons": "Aut quaerat in sit quasi.",
    "reviewable_type": "LearningObject",
    "reviewable_id": 873,
    "user_id": 7860,
    "created_at": "2019-03-08T13:48:04.704Z",
    "updated_at": "2019-03-08T13:48:04.704Z",
    "rates_count": 0,
    "deleted_at": null
  },
  "created_at": "2019-03-08T13:48:09.021Z",
  "updated_at": "2019-03-08T13:48:09.021Z"
}