POST
https://api.cryptohopper.com/v1/social/post/{id}/comment/{comment_id}/like
Likes a comment and notifies its author. Liking a comment you already liked changes nothing.
OAuth scope:
manage About scopes
Example request
curl -X POST "https://api.cryptohopper.com/v1/social/post/POST_ID/comment/COMMENT_ID/like" \
-H "access-token: YOUR_ACCESS_TOKEN"
const response = await fetch('https://api.cryptohopper.com/v1/social/post/POST_ID/comment/COMMENT_ID/like', {
method: 'POST',
headers: {
"access-token": "YOUR_ACCESS_TOKEN"
}
});
const data = await response.json();
import requests
response = requests.post(
"https://api.cryptohopper.com/v1/social/post/POST_ID/comment/COMMENT_ID/like",
headers={
"access-token": "YOUR_ACCESS_TOKEN"
},
)
data = response.json()
$ch = curl_init('https://api.cryptohopper.com/v1/social/post/POST_ID/comment/COMMENT_ID/like');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'access-token: YOUR_ACCESS_TOKEN',
],
]);
$data = json_decode(curl_exec($ch), true);
Parameters
Headers
| Name | Type | Required | Description |
|---|---|---|---|
access-token |
string | Optional | The OAuth access token of the user. |
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
comment_id |
string | Required | Numeric ID of the comment to like. |
id |
string | Required | Numeric ID of the post. |
Response
{
"data": {
"liked": 1,
"total_likes": 3,
"message": "Comment liked."
}
}