friendlypins.utils.console_actions module

Worker methods used to perform actions performed by fpins console app

friendlypins.utils.console_actions.check_rate_limit(api_token)[source]

Checks to see when the next rate limit renewal is to occur

Parameters

api_token (str) – Authentication token for the user who owns the board

Returns

0 if the operation succeeded, otherwise an error code

Return type

int

friendlypins.utils.console_actions.create_board(api_token, board_name)[source]

Creates a new board

Parameters
  • api_token (str) – Authentication token for the user who owns the board

  • board_name (str) – Name of the board to create

Returns

0 if the board was created, otherwise an error code is returned

Return type

int

friendlypins.utils.console_actions.delete_board(api_token, board_name)[source]

Deletes a board owned by a specific user

Parameters
  • api_token (str) – Authentication token for the user who owns the board

  • board_name (str) – Name of the board to delete

Returns

0 if the board was deleted, otherwise an error code is returned

Return type

int

friendlypins.utils.console_actions.download_thumbnails(api_token, board_name, output_folder)[source]

Downloads thumbnails of all pins on a board

Parameters
  • api_token (str) – Authentication token for accessing the Pinterest API

  • board_name (str) – name of the board containing the pins to process

  • output_folder (str) – path where the thumbnails are to be downloaded

Returns

status code describing the result of the action. zero on success, non-zero on failure

Return type

int