@robinpath/pinterest
0.1.2Node.jsPublicPinterest module for RobinPath.
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.listBoardsto perform this operation - getBoard -- Use
pinterest.getBoardto perform this operation - createBoard -- Use
pinterest.createBoardto perform this operation - updateBoard -- Use
pinterest.updateBoardto perform this operation - deleteBoard -- Use
pinterest.deleteBoardto perform this operation
Quick Reference
| Function | Description | Returns |
|---|---|---|
setCredentials | Configure pinterest credentials. | object |
listBoards | listBoards | object |
getBoard | getBoard | object |
createBoard | createBoard | object |
updateBoard | updateBoard | object |
deleteBoard | deleteBoard | object |
listBoardPins | listBoardPins | object |
listPins | listPins | object |
getPin | getPin | object |
createPin | createPin | object |
updatePin | updatePin | object |
deletePin | deletePin | object |
listBoardSections | listBoardSections | object |
createBoardSection | createBoardSection | object |
getUserAccount | getUserAccount | object |
getPinAnalytics | getPinAnalytics | object |
getBoardAnalytics | getBoardAnalytics | object |
Functions
setCredentials
Configure pinterest credentials.
Module: pinterest | Returns: object -- API response.
pinterest.setCredentials
| Parameter | Type | Required | Description |
|---|---|---|---|
accessToken | string | Yes | accessToken |
listBoards
listBoards
Module: pinterest | Returns: object -- API response.
pinterest.listBoards
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
getBoard
getBoard
Module: pinterest | Returns: object -- API response.
pinterest.getBoard
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
createBoard
createBoard
Module: pinterest | Returns: object -- API response.
pinterest.createBoard
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
updateBoard
updateBoard
Module: pinterest | Returns: object -- API response.
pinterest.updateBoard
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
deleteBoard
deleteBoard
Module: pinterest | Returns: object -- API response.
pinterest.deleteBoard
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
listBoardPins
listBoardPins
Module: pinterest | Returns: object -- API response.
pinterest.listBoardPins
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
listPins
listPins
Module: pinterest | Returns: object -- API response.
pinterest.listPins
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
getPin
getPin
Module: pinterest | Returns: object -- API response.
pinterest.getPin
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
createPin
createPin
Module: pinterest | Returns: object -- API response.
pinterest.createPin
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
updatePin
updatePin
Module: pinterest | Returns: object -- API response.
pinterest.updatePin
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
deletePin
deletePin
Module: pinterest | Returns: object -- API response.
pinterest.deletePin
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
listBoardSections
listBoardSections
Module: pinterest | Returns: object -- API response.
pinterest.listBoardSections
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
createBoardSection
createBoardSection
Module: pinterest | Returns: object -- API response.
pinterest.createBoardSection
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
getUserAccount
getUserAccount
Module: pinterest | Returns: object -- API response.
pinterest.getUserAccount
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
getPinAnalytics
getPinAnalytics
Module: pinterest | Returns: object -- API response.
pinterest.getPinAnalytics
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
getBoardAnalytics
getBoardAnalytics
Module: pinterest | Returns: object -- API response.
pinterest.getBoardAnalytics
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
Error Handling
All functions throw on failure. Common errors:
| Error | Cause |
|---|---|
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)
| Version | Tag | Published |
|---|---|---|
| 0.1.2 | latest | 1 months ago |
Related Modules
activecampaign
JS@robinpathv0.1.2
ActiveCampaign -- contacts, automations, campaigns, deals, lists, and tags via the ActiveCampaign REST API v3.
brevo
JS@robinpathv0.1.2
Brevo module for RobinPath.
convertkit
JS@robinpathv0.1.1
Convertkit module for RobinPath.
@robinpathv0.1.1
Facebook module for RobinPath.
$ robinpath add @robinpath/pinterest
