friendlypins.pin module

Primitives for operating on Pinterest pins

class friendlypins.pin.Pin(url, rest_io, json_data=None)[source]

Bases: friendlypins.utils.base_object.BaseObject

Abstraction around a Pinterest pin

Parameters
  • url (str) – URL for this object, relative to the API root

  • rest_io (RestIO) – reference to the Pinterest REST API

  • json_data (dict) – Optional JSON response data describing this object if not provided, the class will lazy load response data when needed

static default_fields()[source]

list (str): list of fields we pre-populate when loading pin data

static default_url(unique_id)[source]

Generates a URL for the REST API endpoint for a pin with a given identification number

Parameters

unique_id (int) – unique ID for the pin

Returns

URL for the API endpoint

Return type

str

delete()[source]

Removes this pin from it’s respective board

Source URL containing the original data for the pin

Type

str

property media_type

descriptor for the type of data stored in the pin’s link

Returns None if the type of data associated with the Pin is unknown

Type

str

property note

Descriptive text associated with pin

Type

str

property thumbnail

the thumbnail image associated with this pin

Type

Thumbnail

property unique_id

The unique identifier associated with this pin

Type

int

property url

Web address for the UI associated with the pin

Type

str