friendlypins.user module

Interfaces for interacting with Pinterest users

class friendlypins.user.User(data, rest_io)[source]

Bases: object

Abstraction around a Pinterest user and their associated data

Parameters:
  • data (dict) – JSON data parsed from the API
  • rest_io (friendlypins.utils.rest_io.RestIO) – reference to the Pinterest REST API
boards

Generator for iterating over the boards owned by this user

Return type:Generator of friendlypins.board.Board
create_board(name, description=None)[source]

Creates a new board for the currently authenticated user

Parameters:
  • name (str) – name for the new board
  • description (str) – optional descriptive text for the board
Returns:

reference to the newly created board

Return type:

friendlypins.board.Board

first_name

Gets the first name of the user

Return type:str
last_name

Gets the last name of the user

Return type:str
name

Gets the name of the user

alias for first_name + last_name

Return type:str
num_boards

Gets the total number of boards owned by this user

Return type:int
num_pins

Gets the total number of pins owned by this user

Return type:int
unique_id

Gets the internal unique ID associated with the user

Return type:int
url

Gets the URL of the users profile

Return type:str