friendlypins.headers module

Primitives for operation in HTTP response headers provided by Pinterest

class friendlypins.headers.Headers(data)[source]

Bases: object

Abstraction around the Pinterest API HTTP response header

Parameters

data (dict) – Header data parsed from the HTTP response

property bytes

Gets the number of bytes contained in the response data

Type

int

property date

Date/time when this header was last populated

Type

datetime.datetime

property percent_rate_remaining

percentage representation of the number of API requests left

See rate_remaining() for more info

Type

int

property rate_limit

number of API requests in total permitted for the authenticated user

Type

int

property rate_remaining

Number of API requests the authenticated user is allowed to make

The remaining number of requests resets every hour, according to the API docs

Type

int

property time_to_refresh

the time stamp of when the rate limiting threshold is renewed

Type

datetime.datetime