PinterestConnector
Accesses the Pinterest social network service to create, edit, download, or delete Pins and Boards or list Pin/Board information from a Pinterest account.
Typical Uses
- Manage data on Pinterest by creating, downloading, and deleting Pins and Boards
- Transfer a Pin's contents into or out of an attribute in FME
- View downloaded Pinterest data using the Data Inspector
- Retrieve Pin and Board names, paths, links and other information from Pinterest to use elsewhere in a workspace
How does it work?
The PinterestConnector uses your Pinterest account credentials (either via a previously defined FME web connection, or by setting up a new FME web connection right from the transformer) to access the social network.
Depending on your choice of actions, it will create, edit or download Pins, Boards, and features; list information from the service; or delete items from the service. On create and edit, link attributes can be added to the output features. On List and Download actions, links and Pin/Board information are added as attributes.
In this example, the PinterestConnector is used to download a Pin as a feature from Pinterest. After creating a valid web connection to a Pinterest account (which can be done right in the Pinterest Account parameter), and browsing to a Board, the Object ID is retrieved, and output attribute names are specified.
An Inspector is added to inspect the geometry of the newly downloaded feature. The feature, along with its attributes, will be sent to the Data Inspector to view the Pin’s image and see a table view of the output attributes.
In this example portion of a workspace, the PinterestConnector is used to create a new Pin on a specific Board, it will then be emailed out to users.
The Pin is created using the PinterestConnector transformer, and filling in the desired information. It is then sent out to the specific users using the Emailer transformer.
The Emailer transformer will allow the user to send out a message to other users that a new Pin has been created and provides them a link to view it.
To specify the link and message to be sent the user, the body in the message section of the transformer dialog needs to opened and filled out. The shareable link can be inserted by adding it into the message from the “FME Feature Attributes”.
Usage Notes
-
This transformer can only create a Pin using .png, .jpg, or.gif images.
Configuration
Input Ports
This transformer accepts any feature.
Output Ports
The output of this transformer will vary depending on the Pinterest Action performed.
-
After a Create and Edit action, URLs to the Board/Pin may be saved to the Shareable Link attribute, and the ID of the Board/Pin will saved to an attribute.
- A Download action can save to a feature.
- A Delete action has no output ports.
- A List action will output a new feature for each Pin found in the Board specified. Each of these new features will have attributes listing various pieces of information about the object.
Features that cause the operation to fail are output through this port. An fme_rejection_code attribute, having the value ERROR_DURING_PROCESSING, will be added, along with a more descriptive fme_rejection_message attribute which contains more specific details as to the reason for the failure.
Rejected Feature Handling: can be set to either terminate the translation or continue running when it encounters a rejected feature. This setting is available both as a default FME option and as a workspace parameter.
Parameters
Pinterest Action |
The type of operation to perform. Choices include:
|
Pinterest Account | Performing operations against a Pinterest account requires the use of OAuth2 authentication using a Web Connection. To create a Pinterest connection, click the 'Pinterest Account' drop-down box and select 'Add Web Connection...'. The connection can then be managed via Tools -> FME Options... -> Web Connections. |
The remaining parameters available depend on the value of the Request > Pinterest Action parameter. Parameters for each Pinterest Action are detailed below.
Features
Create |
The type of data to be created.
|
Board |
The name of the Board to create the Pin in, if Create is set to Pin. |
Name |
The name of the new Board to be created, if Create is set to Board |
Link (optional) |
The outgoing link attached to a Pin, if Create is set to Pin. |
Description |
The description of the Pin or Board. |
Image URL |
The link to an image to be displayed for Pin, if Create is set to Pin. |
Output Attributes
Default attribute names are provided, and may be overwritten.
Sharable Link |
Specify the output attribute that will store a publicly accessible URL that links to the Pin or Board on Pinterest. |
Pin or Board Id |
Specify the output attribute that will store the ID of the Pin/Board that was just created. |
Pinterest Path
Object ID |
The Object ID of a Pin on Pinterest to delete. If valid credentials have been provided as a web connection, you may browse to a location. |
Pinterest Source
Object ID |
The Pinterest ID of the Pin to download. If valid credentials have been provided as a web connection, you may browse to a location. |
Download as |
|
Output Attributes
Default attribute names are provided, and may be overwritten.
Name |
Specify the attribute to hold the name of an object on Pinterest. |
Pin or Board ID |
Specify the attribute to hold the ID of an object on Pinterest. |
Pin Link |
Specify the attribute to hold the link to an object on Pinterest. |
Pin Type |
Specify the attribute to hold the type (Pin or Board) of object. |
Image URL |
Specify the attribute to hold the image URL of the object. |
Edit Features
Edit |
The type of data to be edited.
|
Object ID |
ID of the object to be edited. |
Board (optional) |
The name of the Board to move the Pin to, if Edit is set to Pin. |
Description (optional) |
The new description of the Pin or Board. |
Link (optional) |
The new outgoing link from Pinterest, if Edit is set to Pin. |
Name (optional) |
The new name of the Board, if Edit is set to Board. |
Output Attributes
Default attribute names are provided, and may be overwritten.
Sharable Link |
Specify the output attribute that will store a publicly accessible URL that links to the Pin or Board on Pinterest. |
Pin or Board Id |
Specify the output attribute that will store the ID of the Pin/Board that was just edited. |
Pinterest Path
Object ID |
The Board ID on Pinterest to list the contents of. If valid credentials have been provided as a web connection, you may browse to a location. |
Output Attributes
Default attribute names are provided, and may be overwritten.
Board Name |
Specify the attribute to hold the name of an object on Pinterest. |
Pin or Board ID |
Specify the attribute to hold the ID of an object on Pinterest. |
Pin Link |
Specify the attribute to hold the link to an object on Pinterest. |
Pin Type |
Specify the attribute to hold type (Pin or Board) of object. |
Relative Path |
Specify the attribute to hold the path to the Pin on Pinterest. |
Editing Transformer Parameters
Using a set of menu options, transformer parameters can be assigned by referencing other elements in the workspace. More advanced functions, such as an advanced editor and an arithmetic editor, are also available in some transformers. To access a menu of these options, click beside the applicable parameter. For more information, see Transformer Parameter Menu Options.
Defining Values
There are several ways to define a value for use in a Transformer. The simplest is to simply type in a value or string, which can include functions of various types such as attribute references, math and string functions, and workspace parameters. There are a number of tools and shortcuts that can assist in constructing values, generally available from the drop-down context menu adjacent to the value field.
Using the Text Editor
The Text Editor provides a convenient way to construct text strings (including regular expressions) from various data sources, such as attributes, parameters, and constants, where the result is used directly inside a parameter.
Using the Arithmetic Editor
The Arithmetic Editor provides a convenient way to construct math expressions from various data sources, such as attributes, parameters, and feature functions, where the result is used directly inside a parameter.
Conditional Values
Set values depending on one or more test conditions that either pass or fail.
Parameter Condition Definition Dialog
Content
Expressions and strings can include a number of functions, characters, parameters, and more - whether entered directly in a parameter or constructed using one of the editors.
These functions manipulate and format strings. | |
A set of control characters is available in the Text Editor. | |
Math functions are available in both editors. | |
These operators are available in the Arithmetic Editor. | |
These return primarily feature-specific values. | |
FME and workspace-specific parameters may be used. | |
Working with User Parameters | Create your own editable parameters. |
Reference
Processing Behavior |
|
Feature Holding |
No |
Dependencies | Pinterest account |
FME Licensing Level | FME Professional Edition and above |
Aliases | |
History | Released FME 2018.0 |
Categories |
FME Knowledge Center
The FME Knowledge Center is the place for demos, how-tos, articles, FAQs, and more. Get answers to your questions, learn from other users, and suggest, vote, and comment on new features.
Search for all results about the PinterestConnector on the FME Knowledge Center.