doc.getContext

← All the API methods

Live testing

Get the document context in docstream

  • This method call does not require authentication.
  • "read" permission is necessary to access to private docs.

URL

https://api.ipernity.com/api/doc.getContext

Parameters

api_key Your api_key.
doc_id The ID of the document to get the context for. By default 10 previous and 10 next documents are returned
media Specify the type of returned documents. media values are : photo, audio, video, other.
prev Only return some previous (oldest) documents. (Value is from 1 to 50)
next Only return some next (newest) documents. (Value is from 1 to 50)
thumbsize Choose your prefered size for thumbnails: 75x, 100, 240, 250x, 500, 560, 640, 800, 1024, 1600 or 2048. (Value is 75x by default)
: this parameter is required.
  • The next and prev direction refer to the stream posted date order. Moving to the previous items goes to the stream oldest items and moving to the next items goes to the stream recent items.
  • Access to thumbnail size greater than 800 pixels depends on user preferences.

Response

<prev count="18">
  <doc index="-1" doc_id="51" media="photo" title="Doc 51" safety="1"
       media="photo" w="75" h="75" url="https://u1.ipernity.com/1/00/51/51.d5ea56eb.75x.jpg" 
       link="https://www.ipernity.com/doc/123/51" user_id="123"/>
  <doc index="-2" doc_id="50" media="photo" title="Doc 50"
       media="photo" w="75" h="75" url="https://u1.ipernity.com/1/00/50/50.d5ea56eb.75x.jpg" 
       link="https://www.ipernity.com/doc/123/50" user_id="123"/>
  (...)
  <doc index="-18" doc_id="33" media="photo" title="Doc 68" safety="1"
       media="photo" w="75" h="75" url="https://u1.ipernity.com/1/00/33/33.d5ea56eb.75x.jpg" 
       link="https://www.ipernity.com/doc/123/33" user_id="123"/>
</prev>
<doc index="0" doc_id="50" media="photo" title="Doc 50" safety="1"
       media="photo" w="75" h="75" url="https://u1.ipernity.com/1/00/50/50.d5ea56eb.75x.jpg" 
       link="https://www.ipernity.com/doc/123/50" user_id="123"/>
<next count="10">
  <doc index="1" doc_id="52" media="photo" title="Doc 52" safety="1"
       media="photo" w="75" h="75" url="https://u1.ipernity.com/1/00/52/52.d5ea56eb.75x.jpg" 
       link="https://www.ipernity.com/doc/123/52" user_id="123"/>
  <doc index="2" doc_id="53" media="photo" title="Doc 53" safety="1"
       media="photo" w="75" h="75" url="https://u1.ipernity.com/1/00/53/53.d5ea56eb.75x.jpg" 
       link="https://www.ipernity.com/doc/123/53" user_id="123"/>
  (...)
  <doc index="10" doc_id="61" media="photo" title="Doc 61" safety="1"
       media="photo" w="75" h="75" url="https://u1.ipernity.com/1/00/61/61.d5ea56eb.75x.jpg" 
       link="https://www.ipernity.com/doc/123/61" user_id="123"/>
</next>

Error codes

1 Document not found The document ID is invalid or insufficient permissions to view this doc.

100 API Key is missing Please add the api_key parameter to this request.
101 API Key is invalid This API key is invalid or disabled.
102 Invalid format The requested format is invalid. Valid formats are : json, xml, php.
103 Method not found The requested method is invalid or missing.
104 Signature missing The query signature is missing.
105 Signature is invalid The query signature is invalid.
106 Token missing User is not logged. The authentication token is missing.
107 Token invalid The authentication token is invalid.
108 Account closed The user account is closed or suspended.
109 Action blocked This action is blocked because of a member or a group blocklist restriction
110 Insufficient permissions Insufficient permissions for this method.
111 IP not allowed The request came from a remote address not allowed by this application.
112 Application Quota Error The application has reached its requests quota.
113 Client IP Quota Error The client IP has reached a limit. Limits are based on requests per seconds, minutes, hours, ...
120 HTTP POST required This API method must be called using HTTP POST.
121 Invalid SOAP envelope The SOAP envelope could not be parsed.
122 Invalid XML-RPC envelope The XML-RPC envelope could not be parsed.
130 OAuth protocol version unsupported We only support OAuth version 1.1 and 1.1a
131 OAuth parameters are missing Some of the OAuth parameters were not sent: %s%
132 OAuth Clock skew The timestamp sent is out of ranges. Please check your computer clock is not skewed.
133 OAuth Nonce is invalid The OAuth Nonce parameter cannot be used twice.
134 OAuth Timestamp is invalid The OAuth Timestamp parameter is out of ranges (clock skew) or inferior to the previous timestamp sent.
135 OAuth Signature method unsupported The OAuth Signature must be either MD5, HMAC_SHA1 or PLAINTEXT over HTTPS.
500 Service error Service general error.
501 Maintenance mode Service under temporarily maintenance. Thank you for your kind understanding.
503 Service unavailable The service is temporarily unavailable. Please try again in a few minutes.

Changelog

  • 2008-12-01: Method created.
  • 2010-09-02: Added safety.

See also