Modules@robinpath/pinterest
pinterest

@robinpath/pinterest

0.1.2Node.jsPublic

Pinterest module for RobinPath.

Pinterest

Pinterest module for RobinPath.

Package: @robinpath/pinterest | Category: Social Media | Type: Integration

Authentication

pinterest.setCredentials "your-credentials"

Call this once at the start of your script before using any other function. Credentials persist for the duration of the script execution.

Use Cases

Use the pinterest module when you need to:

  • listBoards -- Use pinterest.listBoards to perform this operation
  • getBoard -- Use pinterest.getBoard to perform this operation
  • createBoard -- Use pinterest.createBoard to perform this operation
  • updateBoard -- Use pinterest.updateBoard to perform this operation
  • deleteBoard -- Use pinterest.deleteBoard to perform this operation

Quick Reference

FunctionDescriptionReturns
setCredentialsConfigure pinterest credentials.object
listBoardslistBoardsobject
getBoardgetBoardobject
createBoardcreateBoardobject
updateBoardupdateBoardobject
deleteBoarddeleteBoardobject
listBoardPinslistBoardPinsobject
listPinslistPinsobject
getPingetPinobject
createPincreatePinobject
updatePinupdatePinobject
deletePindeletePinobject
listBoardSectionslistBoardSectionsobject
createBoardSectioncreateBoardSectionobject
getUserAccountgetUserAccountobject
getPinAnalyticsgetPinAnalyticsobject
getBoardAnalyticsgetBoardAnalyticsobject

Functions

setCredentials

Configure pinterest credentials.

Module: pinterest | Returns: object -- API response.

pinterest.setCredentials
ParameterTypeRequiredDescription
accessTokenstringYesaccessToken

listBoards

listBoards

Module: pinterest | Returns: object -- API response.

pinterest.listBoards
ParameterTypeRequiredDescription
inputstringNoInput parameter

getBoard

getBoard

Module: pinterest | Returns: object -- API response.

pinterest.getBoard
ParameterTypeRequiredDescription
inputstringNoInput parameter

createBoard

createBoard

Module: pinterest | Returns: object -- API response.

pinterest.createBoard
ParameterTypeRequiredDescription
inputstringNoInput parameter

updateBoard

updateBoard

Module: pinterest | Returns: object -- API response.

pinterest.updateBoard
ParameterTypeRequiredDescription
inputstringNoInput parameter

deleteBoard

deleteBoard

Module: pinterest | Returns: object -- API response.

pinterest.deleteBoard
ParameterTypeRequiredDescription
inputstringNoInput parameter

listBoardPins

listBoardPins

Module: pinterest | Returns: object -- API response.

pinterest.listBoardPins
ParameterTypeRequiredDescription
inputstringNoInput parameter

listPins

listPins

Module: pinterest | Returns: object -- API response.

pinterest.listPins
ParameterTypeRequiredDescription
inputstringNoInput parameter

getPin

getPin

Module: pinterest | Returns: object -- API response.

pinterest.getPin
ParameterTypeRequiredDescription
inputstringNoInput parameter

createPin

createPin

Module: pinterest | Returns: object -- API response.

pinterest.createPin
ParameterTypeRequiredDescription
inputstringNoInput parameter

updatePin

updatePin

Module: pinterest | Returns: object -- API response.

pinterest.updatePin
ParameterTypeRequiredDescription
inputstringNoInput parameter

deletePin

deletePin

Module: pinterest | Returns: object -- API response.

pinterest.deletePin
ParameterTypeRequiredDescription
inputstringNoInput parameter

listBoardSections

listBoardSections

Module: pinterest | Returns: object -- API response.

pinterest.listBoardSections
ParameterTypeRequiredDescription
inputstringNoInput parameter

createBoardSection

createBoardSection

Module: pinterest | Returns: object -- API response.

pinterest.createBoardSection
ParameterTypeRequiredDescription
inputstringNoInput parameter

getUserAccount

getUserAccount

Module: pinterest | Returns: object -- API response.

pinterest.getUserAccount
ParameterTypeRequiredDescription
inputstringNoInput parameter

getPinAnalytics

getPinAnalytics

Module: pinterest | Returns: object -- API response.

pinterest.getPinAnalytics
ParameterTypeRequiredDescription
inputstringNoInput parameter

getBoardAnalytics

getBoardAnalytics

Module: pinterest | Returns: object -- API response.

pinterest.getBoardAnalytics
ParameterTypeRequiredDescription
inputstringNoInput parameter

Error Handling

All functions throw on failure. Common errors:

ErrorCause
Pinterest API error (${res.status}): ${t}Check the error message for details
pinterest.setCredentials requires accessToken.Check the error message for details
pinterest.updateBoard requires an ID.Check the error message for details
pinterest.deleteBoard requires an ID.Check the error message for details
pinterest.updatePin requires an ID.Check the error message for details
pinterest.deletePin requires an ID.Check the error message for details
Pinterest: "..." not configured. Call pinterest.setCredentials first.Check the error message for details
@desc "List boards and validate result"
do
  set $result as pinterest.listBoards
  if $result != null
    print "Success"
  else
    print "No result"
  end
enddo

Recipes

1. List and iterate Boards

Retrieve all items and loop through them.

@desc "Setup authentication"
do
  pinterest.setCredentials $token
enddo

@desc "List boards and iterate results"
do
  set $result as pinterest.listBoards
  each $item in $result
    print $item
  end
enddo

2. Create a new item with createBoard

Create a new resource and capture the result.

@desc "Setup authentication"
do
  pinterest.setCredentials $token
enddo

@desc "Create board"
do
  set $result as pinterest.createBoard
  print "Created: " + $result
enddo

3. Create and update workflow

Create an item and then update it.

@desc "Setup authentication"
do
  pinterest.setCredentials $token
enddo

@desc "Create board and update board"
do
  set $created as pinterest.createBoard
  # Update the created item
  pinterest.updateBoard
enddo

4. Check before creating

List existing items and only create if needed.

@desc "Setup authentication"
do
  pinterest.setCredentials $token
enddo

@desc "List boards and create board"
do
  set $existing as pinterest.listBoards
  if $existing == null
    pinterest.createBoard
    print "Item created"
  else
    print "Item already exists"
  end
enddo

5. Multi-step Pinterest workflow

Chain multiple pinterest operations together.

@desc "Setup authentication"
do
  pinterest.setCredentials $token
enddo

@desc "List boards, get board, and more"
do
  set $r_listBoards as pinterest.listBoards
  set $r_getBoard as pinterest.getBoard
  set $r_createBoard as pinterest.createBoard
  print "All operations complete"
enddo

6. Safe listBoards with validation

Check results before proceeding.

@desc "Setup authentication"
do
  pinterest.setCredentials $token
enddo

@desc "List boards and validate result"
do
  set $result as pinterest.listBoards
  if $result != null
    print "Success: " + $result
  else
    print "Operation returned no data"
  end
enddo

Related Modules

  • facebook -- Facebook module for complementary functionality
  • instagram -- Instagram module for complementary functionality
  • twitter -- Twitter/X module for complementary functionality
  • linkedin -- LinkedIn module for complementary functionality
  • tiktok -- TikTok module for complementary functionality

Versions (1)

VersionTagPublished
0.1.2latest1 months ago
Install
$ robinpath add @robinpath/pinterest

Collaborators

Dumitru Balaban
Dumitru Balaban
@dumitru
View all @robinpath modules
Version0.1.2
LicenseMIT
Unpacked Size4.6 KB
Versions1
Weekly Downloads21
Total Downloads21
Stars0
Last Publish1 months ago
Created1 months ago

Category

marketing