POST selfie/posts/:post id/like

From Social ID Developers
(Difference between revisions)
Jump to: navigation, search
 
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
#REDIRECT [[POST posts/:post id/like PT-BR]]
+
<span style="color: red; font-weight: bold">Deprecation notice:</span> this API is deprecated since July 19, 2018.
 +
 
 +
== Description ==
 +
 
 +
Increments the like counter of a post.
 +
 
 +
== Resource URL ==
 +
 
 +
  POST https://api.socialidnow.com/v1/marketing/selfie/posts/:post_id/like
 +
 
 +
== Parameters ==
 +
 
 +
=== URL Parameters ===
 +
 
 +
{|
 +
! align="left" width="200px"  | post_id
 +
| width="200px" | required
 +
| post identifier.
 +
|}
 +
 
 +
=== JSON Parameters ===
 +
 
 +
{|
 +
! align="left" width="200px"  | user_id
 +
| width="200px" | required
 +
| identifier of the user who performed the like action.
 +
|}
 +
 
 +
== Authentication ==
 +
 
 +
This API does not require authentication.
 +
 
 +
== Response ==
 +
 
 +
=== Response Status ===
 +
 
 +
{|
 +
! align="left" width="200px" | created (201)
 +
| The like was created successfully.
 +
|-
 +
! align="left" width="200px" | bad_request (400)
 +
| Some required parameter was not informed.
 +
|-
 +
! align="left" width="200px" | unprocessable_entity (422)
 +
| Validation error in the field "user_id". An user (user_id) can't perform the like action more than once for the same post.
 +
|-
 +
! align="left" width="200px" | internal_server_error (500)
 +
| An unknown error happened.
 +
|}
 +
 
 +
== Examples ==
 +
 
 +
=== Request ===
 +
 
 +
Performs the like of post "123" by the user identified by the IP "50.97.87.253".
 +
 
 +
  curl -iX POST 'https://api.socialidnow.com/v1/marketing/selfie/posts/123/like' \
 +
        -d '{"user_id":"50.97.87.253"}' \
 +
        -H 'Content-type:application/json'
 +
 
 +
=== Response ===
 +
 
 +
==== Response Headers ====
 +
 
 +
HTTP/1.1 201 Created
 +
Status: 201

Latest revision as of 16:07, 29 October 2018

Deprecation notice: this API is deprecated since July 19, 2018.

Contents

Description

Increments the like counter of a post.

Resource URL

  POST https://api.socialidnow.com/v1/marketing/selfie/posts/:post_id/like

Parameters

URL Parameters

post_id required post identifier.

JSON Parameters

user_id required identifier of the user who performed the like action.

Authentication

This API does not require authentication.

Response

Response Status

created (201) The like was created successfully.
bad_request (400) Some required parameter was not informed.
unprocessable_entity (422) Validation error in the field "user_id". An user (user_id) can't perform the like action more than once for the same post.
internal_server_error (500) An unknown error happened.

Examples

Request

Performs the like of post "123" by the user identified by the IP "50.97.87.253".

 curl -iX POST 'https://api.socialidnow.com/v1/marketing/selfie/posts/123/like' \
        -d '{"user_id":"50.97.87.253"}' \
        -H 'Content-type:application/json'

Response

Response Headers

HTTP/1.1 201 Created
Status: 201
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox