Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
444 lines (427 sloc) 21.3 KB
<?xml version="1.0" encoding="utf-8" ?>
<Suite RequireVersion="7.0" Category="Social" Title="Pinterest" Id="Pinterest" SourceUrl="https://github.com/nielsbosma/SeoTools-for-Excel-Connectors/blob/master/Pinterest.xml" HelpUrl="http://seotoolsforexcel.com/pinterest/" HelpText="Documentation">
<Author Name="Victor" Url="http://community.seotoolsforexcel.com/users/diskborste/activity"/>
<Settings HelpText="What's this?" HelpUrl="http://seotoolsforexcel.com/pinterest/">
<Text Id="Key" Title="Access Token" Required="true"/>
</Settings>
<Resources>
<Resource Id="Fail">
<Fail>
<JsonPath Expr="$.message"/>
</Fail>
</Resource>
</Resources>
<RestConnector Id="UserLookup" Title="User Lookup">
<Parameters>
<Text Id="User" Title="Username or User Id or Me" Debug.DefaultValue="viviangomes" Required="true"/>
</Parameters>
<Fetch>
<Fetch.Url>
<![CDATA[
https://api.pinterest.com/v1/users/@(Model.User)/?access_token=@(Model.Key)
&fields=first_name,id,last_name,url,account_type,bio,counts,created_at,username,image
]]>
</Fetch.Url>
</Fetch>
<Parse>
<JsonPath Expr="data">
<JsonPath Expr="id" Id="UserId" Title="User Id" Converter="String"/>
<JsonPath Expr="username" Id="Username" Title="Username" Converter="String"/>
<JsonPath Expr="counts.pins" Id="Pins" Title="Pins" Converter="Int"/>
<JsonPath Expr="counts.followers" Id="Followers" Title="Followers" Converter="Int"/>
<JsonPath Expr="counts.following" Id="Following" Title="Following" Converter="Int"/>
<JsonPath Expr="counts.boards" Id="Boards" Title="Boards" Converter="Int"/>
<JsonPath Expr="first_name" Id="FirstName" Title="First Name" Converter="String"/>
<JsonPath Expr="last_name" Id="LastName" Title="Last Name" Converter="String"/>
<JsonPath Expr="bio" Id="Bio" Title="Bio" Converter="String"/>
<JsonPath Expr="created_at" Id="Created" Title="Created" Converter="DateTime"/>
<JsonPath Expr="account_type" Id="AccountType" Title="Account Type" Converter="String"/>
<JsonPath Expr="url" Id="Url" Title="URL" Converter="String"/>
<JsonPath Expr="image..url" Id="ImageUrl" Title="Image URL" Converter="String"/>
</JsonPath>
</Parse>
<Resource Id="Fail"/>
</RestConnector>
<RestConnector Id="PinLookup" Title="Pin Lookup">
<Parameters>
<Text Id="Pin" Title="Pin Id" Debug.DefaultValue="470837336012272856" Required="true"/>
</Parameters>
<Fetch>
<Fetch.Url>
<![CDATA[
https://api.pinterest.com/v1/pins/@(Model.Pin)/?access_token=@(Model.Key)
&fields=id,link,note,url,attribution,board,counts,created_at,media,creator,metadata,original_link,image
]]>
</Fetch.Url>
</Fetch>
<Parse>
<JsonPath Expr="data">
<JsonPath Expr="created_at" Id="Created" Title="Created" Converter="DateTime"/>
<JsonPath Expr="note" Id="Note" Title="Note" Converter="String"/>
<JsonPath Expr="media.type" Id="Type" Title="Type" Converter="String"/>
<JsonPath Expr="counts.saves" Id="Saves" Title="Saves" Converter="Int"/>
<JsonPath Expr="counts.comments" Id="Comments" Title="Comments" Converter="Int"/>
<JsonPath Expr="link" Id="Link" Title="Link" Converter="String"/>
<JsonPath Expr="original_link" Id="OriginalLink" Title="Original Link" Converter="String"/>
<JsonPath Expr="image..url" Id="ImageUrl" Title="Image URL" Converter="String"/>
<JsonPath Expr="board.id" Id="BoardId" Title="Board Id" Converter="String"/>
<JsonPath Expr="board.name" Id="BoardName" Title="Board Name" Converter="String"/>
<JsonPath Expr="board.url" Id="BoardUrl" Title="Board URL" Converter="String"/>
<JsonPath Expr="creator.id" Id="CreatorId" Title="Creator Id" Converter="String"/>
<JsonPath Expr="creator.first_name" Id="CreatorFirstName" Title="Creator First Name" Converter="String"/>
<JsonPath Expr="creator.last_name" Id="CreatorLastName" Title="Creator Last Name" Converter="String"/>
<JsonPath Expr="creator.url" Id="CreatorUrl" Title="Creator URL" Converter="String"/>
</JsonPath>
</Parse>
<Resource Id="Fail"/>
</RestConnector>
<RestConnector Id="BoardLookup" Title="Board Lookup">
<Parameters>
<Text Id="BoardId" Title="Board Id or board/slug combo" Debug.DefaultValue="292241532009023790" Required="true"/>
</Parameters>
<Fetch>
<Fetch.Url>
<![CDATA[
https://api.pinterest.com/v1/boards/@(Model.BoardId)/?access_token=@(Model.Key)
&fields=id,name,url,counts,created_at,creator,description,image,privacy
]]>
</Fetch.Url>
</Fetch>
<Parse>
<JsonPath Expr="data">
<JsonPath Expr="id" Id="BoardId" Title="Board Id" Converter="String"/>
<JsonPath Expr="name" Id="BoardName" Title="BoardName" Converter="String"/>
<JsonPath Expr="counts.pins" Id="Pins" Title="Pins" Converter="Int"/>
<JsonPath Expr="counts.collaborators" Id="Collaborators" Title="Collaborators" Converter="Int"/>
<JsonPath Expr="counts.followers" Id="Followers" Title="Followers" Converter="Int"/>
<JsonPath Expr="description" Id="Description" Title="Description" Converter="String"/>
<JsonPath Expr="created_at" Id="Created" Title="Created" Converter="DateTime"/>
<JsonPath Expr="privacy" Id="Privacy" Title="Privacy" Converter="String"/>
<JsonPath Expr="url" Id="Url" Title="URL" Converter="String"/>
<JsonPath Expr="image..url" Id="ImageUrl" Title="Image URL" Converter="String"/>
<JsonPath Expr="creator.id" Id="CreatorId" Title="Creator Id" Converter="String"/>
<JsonPath Expr="creator.first_name" Id="CreatorFirstName" Title="Creator First Name" Converter="String"/>
<JsonPath Expr="creator.last_name" Id="CreatorLastName" Title="Creator Last Name" Converter="String"/>
<JsonPath Expr="creator.url" Id="CreatorUrl" Title="Creator URL" Converter="String"/>
</JsonPath>
</Parse>
<Resource Id="Fail"/>
</RestConnector>
<RestConnector Id="BoardPins" Title="Board Pins">
<Parameters>
<Text Id="BoardId" Title="Board Id or board/slug combo" Debug.DefaultValue="292241532009023790" Required="true"/>
</Parameters>
<Paging PageSize="25" EvenPages="false">
<Parse>
<JsonPath Id="Cursor" Expr="page.cursor"/>
</Parse>
</Paging>
<Fetch>
<Fetch.Url>
<![CDATA[
https://api.pinterest.com/v1/boards/@(Model.BoardId)/pins/?access_token=@(Model.Key)
&fields=id,link,note,url,counts,created_at,creator,media,original_link,image
&limit=@(Model.PageCursor.NextTake)
@(Model.PageCursor.Page != 0 && @Model.Cursor != "null" ? "&cursor=" + Model.Cursor : "")
]]>
</Fetch.Url>
</Fetch>
<Parse>
<JsonPath Expr="data.*">
<JsonPath Expr="url" Id="Url" Title="URL" Converter="String"/>
<JsonPath Expr="id" Id="PinId" Title="Pin Id" Converter="String"/>
<JsonPath Expr="created_at" Id="Created" Title="Created" Converter="DateTime"/>
<JsonPath Expr="note" Id="Note" Title="Note" Converter="String"/>
<JsonPath Expr="media.type" Id="Type" Title="Type" Converter="String"/>
<JsonPath Expr="counts.saves" Id="Saves" Title="Saves" Converter="Int"/>
<JsonPath Expr="counts.comments" Id="Comments" Title="Comments" Converter="Int"/>
<JsonPath Expr="original_link" Id="OriginalLink" Title="Original Link" Converter="String"/>
<JsonPath Expr="image..url" Id="ImageUrl" Title="Image URL" Converter="String"/>
<JsonPath Expr="creator.id" Id="CreatorId" Title="Creator Id" Converter="String"/>
<JsonPath Expr="creator.first_name" Id="CreatorFirstName" Title="Creator First Name" Converter="String"/>
<JsonPath Expr="creator.last_name" Id="CreatorLastName" Title="Creator Last Name" Converter="String"/>
<JsonPath Expr="creator.url" Id="CreatorUrl" Title="Creator URL" Converter="String"/>
</JsonPath>
</Parse>
<Resource Id="Fail"/>
</RestConnector>
<RestConnector Id="MyBoards" Title="My Boards">
<Fetch>
<Fetch.Url>
<![CDATA[
https://api.pinterest.com/v1/me/boards?access_token=@(Model.Key)
&fields=id,name,url,counts,created_at,creator,description,privacy,image
]]>
</Fetch.Url>
</Fetch>
<Parse>
<JsonPath Expr="data.*">
<JsonPath Expr="id" Id="BoardId" Title="Board Id" Converter="String"/>
<JsonPath Expr="name" Id="BoardName" Title="BoardName" Converter="String"/>
<JsonPath Expr="counts.pins" Id="Pins" Title="Pins" Converter="Int"/>
<JsonPath Expr="counts.collaborators" Id="Collaborators" Title="Collaborators" Converter="Int"/>
<JsonPath Expr="counts.followers" Id="Followers" Title="Followers" Converter="Int"/>
<JsonPath Expr="description" Id="Description" Title="Description" Converter="String"/>
<JsonPath Expr="created_at" Id="Created" Title="Created" Converter="DateTime"/>
<JsonPath Expr="privacy" Id="Privacy" Title="Privacy" Converter="String"/>
<JsonPath Expr="url" Id="Url" Title="URL" Converter="String"/>
<JsonPath Expr="image..url" Id="ImageUrl" Title="Image URL" Converter="String"/>
</JsonPath>
</Parse>
<Resource Id="Fail"/>
</RestConnector>
<RestConnector Id="MyFollowers" Title="My Followers">
<Paging PageSize="25" EvenPages="false">
<Parse>
<JsonPath Id="Cursor" Expr="page.cursor"/>
</Parse>
</Paging>
<Fetch>
<Fetch.Url>
<![CDATA[
https://api.pinterest.com/v1/me/followers?access_token=@(Model.Key)
&fields=first_name,id,last_name,url,account_type,bio,counts,created_at,username,image
&limit=@(Model.PageCursor.NextTake)
@(Model.PageCursor.Page != 0 && @Model.Cursor != "null" ? "&cursor=" + Model.Cursor : "")
]]>
</Fetch.Url>
</Fetch>
<Parse>
<JsonPath Expr="data.*">
<JsonPath Expr="id" Id="UserId" Title="User Id" Converter="String"/>
<JsonPath Expr="username" Id="Username" Title="Username" Converter="String"/>
<JsonPath Expr="counts.pins" Id="Pins" Title="Pins" Converter="Int"/>
<JsonPath Expr="counts.followers" Id="Followers" Title="Followers" Converter="Int"/>
<JsonPath Expr="counts.following" Id="Following" Title="Following" Converter="Int"/>
<JsonPath Expr="counts.boards" Id="Boards" Title="Boards" Converter="Int"/>
<JsonPath Expr="first_name" Id="FirstName" Title="First Name" Converter="String"/>
<JsonPath Expr="last_name" Id="LastName" Title="Last Name" Converter="String"/>
<JsonPath Expr="bio" Id="Bio" Title="Bio" Converter="String"/>
<JsonPath Expr="created_at" Id="Created" Title="Created" Converter="DateTime"/>
<JsonPath Expr="account_type" Id="AccountType" Title="Account Type" Converter="String"/>
<JsonPath Expr="url" Id="Url" Title="URL" Converter="String"/>
<JsonPath Expr="image..url" Id="ImageUrl" Title="Image URL" Converter="String"/>
</JsonPath>
</Parse>
<Resource Id="Fail"/>
</RestConnector>
<RestConnector Id="MyFollowings" Title="My Followings">
<Paging PageSize="25" EvenPages="false">
<Parse>
<JsonPath Id="Cursor" Expr="page.cursor"/>
</Parse>
</Paging>
<Fetch>
<Fetch.Url>
<![CDATA[
https://api.pinterest.com/v1/me/following/users/?access_token=@(Model.Key)
&fields=first_name,id,last_name,url,account_type,bio,counts,created_at,username,image
&limit=@(Model.PageCursor.NextTake)
@(Model.PageCursor.Page != 0 && @Model.Cursor != "null" ? "&cursor=" + Model.Cursor : "")
]]>
</Fetch.Url>
</Fetch>
<Parse>
<JsonPath Expr="data.*">
<JsonPath Expr="id" Id="UserId" Title="User Id" Converter="String"/>
<JsonPath Expr="username" Id="Username" Title="Username" Converter="String"/>
<JsonPath Expr="counts.pins" Id="Pins" Title="Pins" Converter="Int"/>
<JsonPath Expr="counts.followers" Id="Followers" Title="Followers" Converter="Int"/>
<JsonPath Expr="counts.following" Id="Following" Title="Following" Converter="Int"/>
<JsonPath Expr="counts.boards" Id="Boards" Title="Boards" Converter="Int"/>
<JsonPath Expr="first_name" Id="FirstName" Title="First Name" Converter="String"/>
<JsonPath Expr="last_name" Id="LastName" Title="Last Name" Converter="String"/>
<JsonPath Expr="bio" Id="Bio" Title="Bio" Converter="String"/>
<JsonPath Expr="created_at" Id="Created" Title="Created" Converter="DateTime"/>
<JsonPath Expr="account_type" Id="AccountType" Title="Account Type" Converter="String"/>
<JsonPath Expr="url" Id="Url" Title="URL" Converter="String"/>
<JsonPath Expr="image..url" Id="ImageUrl" Title="Image URL" Converter="String"/>
</JsonPath>
</Parse>
<Resource Id="Fail"/>
</RestConnector>
<RestConnector Id="MyLikedPins" Title="My Liked Pins">
<Paging PageSize="25" EvenPages="false">
<Parse>
<JsonPath Id="Cursor" Expr="page.cursor"/>
</Parse>
</Paging>
<Fetch>
<Fetch.Url>
<![CDATA[
https://api.pinterest.com/v1/me/likes/?access_token=@(Model.Key)
&fields=id,link,note,url,attribution,board,counts,created_at,media,creator,metadata,original_link,image
&limit=@(Model.PageCursor.NextTake)
@(Model.PageCursor.Page != 0 && @Model.Cursor != "null" ? "&cursor=" + Model.Cursor : "")
]]>
</Fetch.Url>
</Fetch>
<Parse>
<JsonPath Expr="data.*">
<JsonPath Expr="created_at" Id="Created" Title="Created" Converter="DateTime"/>
<JsonPath Expr="note" Id="Note" Title="Note" Converter="String"/>
<JsonPath Expr="media.type" Id="Type" Title="Type" Converter="String"/>
<JsonPath Expr="counts.saves" Id="Saves" Title="Saves" Converter="Int"/>
<JsonPath Expr="counts.comments" Id="Comments" Title="Comments" Converter="Int"/>
<JsonPath Expr="link" Id="Link" Title="Link" Converter="String"/>
<JsonPath Expr="original_link" Id="OriginalLink" Title="Original Link" Converter="String"/>
<JsonPath Expr="image..url" Id="ImageUrl" Title="Image URL" Converter="String"/>
<JsonPath Expr="board.id" Id="BoardId" Title="Board Id" Converter="String"/>
<JsonPath Expr="board.name" Id="BoardName" Title="Board Name" Converter="String"/>
<JsonPath Expr="board.url" Id="BoardUrl" Title="Board URL" Converter="String"/>
<JsonPath Expr="creator.id" Id="CreatorId" Title="Creator Id" Converter="String"/>
<JsonPath Expr="creator.first_name" Id="CreatorFirstName" Title="Creator First Name" Converter="String"/>
<JsonPath Expr="creator.last_name" Id="CreatorLastName" Title="Creator Last Name" Converter="String"/>
<JsonPath Expr="creator.url" Id="CreatorUrl" Title="Creator URL" Converter="String"/>
</JsonPath>
</Parse>
<Resource Id="Fail"/>
</RestConnector>
<RestConnector Id="MyPins" Title="My Pins">
<Paging PageSize="25" EvenPages="false">
<Parse>
<JsonPath Id="Cursor" Expr="page.cursor"/>
</Parse>
</Paging>
<Fetch>
<Fetch.Url>
<![CDATA[
https://api.pinterest.com/v1/me/pins/?access_token=@(Model.Key)
&fields=id,link,note,url,attribution,board,counts,created_at,media,creator,metadata,original_link,image
&limit=@(Model.PageCursor.NextTake)
@(Model.PageCursor.Page != 0 && @Model.Cursor != "null" ? "&cursor=" + Model.Cursor : "")
]]>
</Fetch.Url>
</Fetch>
<Parse>
<JsonPath Expr="data.*">
<JsonPath Expr="created_at" Id="Created" Title="Created" Converter="DateTime"/>
<JsonPath Expr="note" Id="Note" Title="Note" Converter="String"/>
<JsonPath Expr="media.type" Id="Type" Title="Type" Converter="String"/>
<JsonPath Expr="counts.saves" Id="Saves" Title="Saves" Converter="Int"/>
<JsonPath Expr="counts.comments" Id="Comments" Title="Comments" Converter="Int"/>
<JsonPath Expr="link" Id="Link" Title="Link" Converter="String"/>
<JsonPath Expr="original_link" Id="OriginalLink" Title="Original Link" Converter="String"/>
<JsonPath Expr="image..url" Id="ImageUrl" Title="Image URL" Converter="String"/>
<JsonPath Expr="board.id" Id="BoardId" Title="Board Id" Converter="String"/>
<JsonPath Expr="board.name" Id="BoardName" Title="Board Name" Converter="String"/>
<JsonPath Expr="board.url" Id="BoardUrl" Title="Board URL" Converter="String"/>
</JsonPath>
</Parse>
<Resource Id="Fail"/>
</RestConnector>
<RestConnector Id="MyPinsSearch" Title="My Pins Search">
<Parameters>
<Text Id="Query" Title="Query" Debug.DefaultValue="hawaii" Required="true"/>
</Parameters>
<Paging PageSize="25" EvenPages="false">
<Parse>
<JsonPath Id="Cursor" Expr="page.cursor"/>
</Parse>
</Paging>
<Fetch>
<Fetch.Url>
<![CDATA[
https://api.pinterest.com/v1/me/search/pins/
?query=@Utils.UrlEncode(Model.Query)
&access_token=@(Model.Key)
&fields=id,link,note,url,attribution,board,counts,created_at,media,creator,metadata,original_link,image
&limit=@(Model.PageCursor.NextTake)
@(Model.PageCursor.Page != 0 && @Model.Cursor != "null" ? "&cursor=" + Model.Cursor : "")
]]>
</Fetch.Url>
</Fetch>
<Parse>
<JsonPath Expr="data.*">
<JsonPath Expr="created_at" Id="Created" Title="Created" Converter="DateTime"/>
<JsonPath Expr="note" Id="Note" Title="Note" Converter="String"/>
<JsonPath Expr="media.type" Id="Type" Title="Type" Converter="String"/>
<JsonPath Expr="counts.saves" Id="Saves" Title="Saves" Converter="Int"/>
<JsonPath Expr="counts.comments" Id="Comments" Title="Comments" Converter="Int"/>
<JsonPath Expr="link" Id="Link" Title="Link" Converter="String"/>
<JsonPath Expr="original_link" Id="OriginalLink" Title="Original Link" Converter="String"/>
<JsonPath Expr="image..url" Id="ImageUrl" Title="Image URL" Converter="String"/>
<JsonPath Expr="board.id" Id="BoardId" Title="Board Id" Converter="String"/>
<JsonPath Expr="board.name" Id="BoardName" Title="Board Name" Converter="String"/>
<JsonPath Expr="board.url" Id="BoardUrl" Title="Board URL" Converter="String"/>
</JsonPath>
</Parse>
<Resource Id="Fail"/>
</RestConnector>
<RestConnector Id="MyBoardsSearch" Title="My Boards Search">
<Parameters>
<Text Id="Query" Title="Query" Debug.DefaultValue="hawaii" Required="true"/>
</Parameters>
<Paging PageSize="25" EvenPages="false">
<Parse>
<JsonPath Id="Cursor" Expr="page.cursor"/>
</Parse>
</Paging>
<Fetch>
<Fetch.Url>
<![CDATA[
https://api.pinterest.com/v1/me/search/boards/
?query=@Utils.UrlEncode(Model.Query)
&access_token=@(Model.Key)
&fields=id,name,url,counts,created_at,creator,description,privacy,image
&limit=@(Model.PageCursor.NextTake)
@(Model.PageCursor.Page != 0 && @Model.Cursor != "null" ? "&cursor=" + Model.Cursor : "")
]]>
</Fetch.Url>
</Fetch>
<Parse>
<JsonPath Expr="data.*">
<JsonPath Expr="id" Id="BoardId" Title="Board Id" Converter="String"/>
<JsonPath Expr="name" Id="BoardName" Title="BoardName" Converter="String"/>
<JsonPath Expr="counts.pins" Id="Pins" Title="Pins" Converter="Int"/>
<JsonPath Expr="counts.collaborators" Id="Collaborators" Title="Collaborators" Converter="Int"/>
<JsonPath Expr="counts.followers" Id="Followers" Title="Followers" Converter="Int"/>
<JsonPath Expr="description" Id="Description" Title="Description" Converter="String"/>
<JsonPath Expr="created_at" Id="Created" Title="Created" Converter="DateTime"/>
<JsonPath Expr="privacy" Id="Privacy" Title="Privacy" Converter="String"/>
<JsonPath Expr="url" Id="Url" Title="URL" Converter="String"/>
<JsonPath Expr="image..url" Id="ImageUrl" Title="Image URL" Converter="String"/>
</JsonPath>
</Parse>
<Resource Id="Fail"/>
</RestConnector>
<RestConnector Id="MyInterests" Title="My Interests">
<Paging PageSize="25" EvenPages="false">
<Parse>
<JsonPath Id="Cursor" Expr="page.cursor"/>
</Parse>
</Paging>
<Fetch>
<Fetch.Url>
<![CDATA[
https://api.pinterest.com/v1/me/following/interests/?access_token=@(Model.Key)
&fields=id,name
&limit=@(Model.PageCursor.NextTake)
@(Model.PageCursor.Page != 0 && @Model.Cursor != "null" ? "&cursor=" + Model.Cursor : "")
]]>
</Fetch.Url>
</Fetch>
<Parse>
<JsonPath Expr="data.*">
<JsonPath Expr="id" Id="InterestId" Title="Interest Id" Converter="String"/>
<JsonPath Expr="name" Id="Interest Name" Title="Interest Name" Converter="String"/>
</JsonPath>
</Parse>
<Resource Id="Fail"/>
</RestConnector>
<RestConnector Id="BoardIdScraper" Title="Board Id from URL">
<Parameters>
<Text Id="BoardUrl" Title="Board URL" Debug.DefaultValue="https://www.pinterest.se/tentabi/inspiration/" Required="true"/>
</Parameters>
<Fetch>
<Fetch.Url>
<![CDATA[
@(Model.BoardUrl)
]]>
</Fetch.Url>
</Fetch>
<Parse>
<Regex Id="BoardId" Expr="board_id=\\&quot;(\d+)\\&quot;" Group="1"/>
</Parse>
</RestConnector>
</Suite>
You can’t perform that action at this time.