friendlypins.board module

Primitives for interacting with Pinterest boards

class friendlypins.board.Board(url, rest_io, json_data=None)[source]

Bases: friendlypins.utils.base_object.BaseObject

Abstraction around a Pinterest board

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

property creation_date

when this board was created

Type

datetime.datetime

static default_fields()[source]

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

static default_url(unique_id)[source]

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

Parameters

unique_id (int) – unique ID for the board

Returns

URL for the API endpoint

Return type

str

delete()[source]

Removes this board and all pins attached to it

property description

The descriptive text associated with this board

Type

str

property name

The name of the board

Type

str

property num_collaborators

number of people with edit permissions to this board

Type

int

property num_followers

number of people following this board

Type

int

property num_pins

The total number of pins linked to this board

Type

int

property pins

pins linked to this board

Yields

Pin – generator that lazy loads the definitions for every pin on this board

property privacy_setting

description of the restriction / privacy level of the board

Type

str

property unique_id

The unique identifier associated with this board

Type

int

property url

Web address for the UI associated with the dashboard

Type

str