GET /ingredients/:id_or_alias/endorsed_opinions
Returns all endorsed opinions for the ingredient
Path parameters
-
ID of the resource to return
Query parameters
-
endorser string
filter by user_type
Values are
brand
,expert
, orexpert_or_brand
. Default value isexpert_or_brand
. -
feeling_type string
filter to only positive or negative
Values are
positive
ornegative
.
GET /ingredients/{id_or_alias}/endorsed_opinions
curl \
-X GET https://api.cosmily.com/api/v1/ingredients/{id_or_alias}/endorsed_opinions \
-H "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
"data": [
{
"entry_uuid": "string",
"opinion_uuid": "string",
"revision": 42,
"publication": "published",
"created_at": "string",
"feeling_type": "positive",
"ingredient_id": 42,
"author_user_id": 42,
"active": true,
"content": {
"text": "working towards #sustainability with @alex",
"entities": {
"hashtags": [
{
"text": "sustainability",
"indices": [
16,
31
]
}
],
"user_mentions": [
{
"username": "alex",
"indices": [
37,
42
],
"id": 42,
"name": "string"
}
]
}
}
}
],
"links": {
"first": "string",
"last": "string",
"prev": "string",
"next": "string"
}
}
Response examples (200)
{
"data": [
{
"entry_uuid": "string",
"opinion_uuid": "string",
"revision": 42,
"publication": "published",
"created_at": "string",
"feeling_type": "positive",
"ingredient_id": 42,
"author_user_id": 42,
"active": true,
"content": {
"text": "working towards #sustainability with @alex",
"entities": {
"hashtags": [
{
"text": "sustainability",
"indices": [
16,
31
]
}
],
"user_mentions": [
{
"username": "alex",
"indices": [
37,
42
],
"id": 42,
"name": "string"
}
]
}
}
}
],
"links": {
"first": "string",
"last": "string",
"prev": "string",
"next": "string"
}
}