Blocks/exists
« Return to the list of API methods
Contents |
URL
http://yourserver/api/blocks/exists.format
Description
It checks if the logged user is blocking the specified user. If the logged user is blocking the specified user, info about the user will be returned. Otherwise, an error will be shown.
Available formats
XML, JSON
HTTP Method
GET
Requires authentication
YES
Optional parameters
These parameters can be passed through GET or POST.
- ID: The ID or username of the user you want to follow. Example: http://yourserver/api/blocks/exists/2.xml
- screen_name: The username of the user you want to follow. Example: http://yourserver/api/blocks/exists.json?screen_name=abcded
- user_id: The user ID of the user you want to follow. Example: http://yourserver/api/blocks/exists.xml?user_id=2
Return example (XML)
curl http://yourserver/api/blocks/exists.xml?id=lorena
<friends><?xml version="1.0" encoding="UTF-8"?> <hash> <request>/api/blocks/exists/lorena.xml</request> <error>You are not blocking this user.</error> </hash> </friends>
Return example (JSON)
curl http://yourserver/api/blocks/exists.json?id=lorena
{ "request": "\/api\/blocks\/exists\/lorena.json", "error": "You are not blocking this user." }

