Skip to content

V2 block user

Rafael Chacon edited this page Feb 22, 2012 · 1 revision

###URL: POST http://public-api.piictu.com/v2/blocks

###HTTP method(s): POST

###Requires authentication (Authentication and Authorization): Yes

###Parameters:

  • id id of the user you want to block

###Usage example:

Example using cURL:

curl -i http://public-api.piictu.com/v2/blocks \
  -F id=4d6ebc4f5a0d032648000016 \
  -H "Authorization: OAuth 2540af0de12cb2367691516b8477b0b7bd66dbd8ab6840b147340c6898c4eebd" \
  -X POST

###Response:

On success

  • HTTP response code is 200 (ok)
  • HTTP response body is a JSON string like this:
{
  "blocked": {
    "id": "4e014c6d670fd6000100153b",
    "username": "asiangoldfish",
    "avatar_url": "http://piictu.s3.amazonaws.com/avatars/4e014c6d670fd6000100153b/90x90_1326349996",
    "fullname": "Haley Bailey",
    "bio": "",
    "photos_count": 271
  }
}

On error (when friend doesn't exist)

  • HTTP response code is 404 (document not found)
  • HTTP response body is a JSON string like this:
{
    "error" : "document not found"
}

Clone this wiki locally