New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

pinterest_sdk

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pinterest_sdk

  • 1.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

pinterest_sdk

PinterestSdkClient - the Ruby gem for the Pinterest REST API

Pinterest's REST API

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 5.3.0
  • Package version: 1.1.0
  • Build package: org.openapitools.codegen.languages.RubyClientCodegen For more information, please visit https://github.com/cliffano/pinterest-sdk

Installation

Build a gem

To build the Ruby code into a gem:

gem build pinterest_sdk.gemspec

Then either install the gem locally:

gem install ./pinterest_sdk-1.1.0.gem

(for development, run gem install --dev ./pinterest_sdk-1.1.0.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'pinterest_sdk', '~> 1.1.0'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:

gem 'pinterest_sdk', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'pinterest_sdk'

# Setup authorization
PinterestSdkClient.configure do |config|
  # Configure OAuth2 access token for authorization: pinterest_oauth2
  config.access_token = 'YOUR ACCESS TOKEN'
end

api_instance = PinterestSdkClient::AdAccountsApi.new
ad_account_id = 'ad_account_id_example' # String | Unique identifier of an ad account.
start_date = Date.parse('2013-10-20') # Date | Metric report start date (UTC). Format: YYYY-MM-DD
end_date = Date.parse('2013-10-20') # Date | Metric report end date (UTC). Format: YYYY-MM-DD
columns = ['AD_ACCOUNT_ID'] # Array<String> | Columns to retrieve. **NOTE**: Any metrics defined as MICRO_DOLLARS returns a value based on the advertiser profile's currency field. For USD,($1/1,000,000, or $0.000001 - one one-ten-thousandth of a cent). it's microdollars. Otherwise, it's in microunits of the advertiser's currency.<br/>For example, if the advertiser's currency is GBP (British pound sterling), all MICRO_DOLLARS fields will be in GBP microunits (1/1,000,000 British pound).<br/>If a column has no value, it may not be returned
granularity = PinterestSdkClient::Granularity::TOTAL # Granularity | Granularity
opts = {
  click_window_days: 1, # Integer | Number of days to use as the conversion attribution window for a pin click action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `30` days.
  engagement_window_days: 1, # Integer | Number of days to use as the conversion attribution window for an engagement action. Engagements include saves, closeups, link clicks, and carousel card swipes. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `30` days.
  view_window_days: 1, # Integer | Number of days to use as the conversion attribution window for a view action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `1` day.
  conversion_report_time: 'TIME_OF_AD_ACTION' # String | The date by which the conversion metrics returned from this endpoint will be reported. There are two dates associated with a conversion event: the date that the user interacted with the ad, and the date that the user completed a conversion event.
}

begin
  #Get ad account analytics
  result = api_instance.ad_account_analytics(ad_account_id, start_date, end_date, columns, granularity, opts)
  p result
rescue PinterestSdkClient::ApiError => e
  puts "Exception when calling AdAccountsApi->ad_account_analytics: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://api.pinterest.com/v5

ClassMethodHTTP requestDescription
PinterestSdkClient::AdAccountsApiad_account_analyticsGET /ad_accounts/{ad_account_id}/analyticsGet ad account analytics
PinterestSdkClient::AdAccountsApiad_accounts_listGET /ad_accountsList ad accounts
PinterestSdkClient::AdAccountsApiad_groups_analyticsGET /ad_accounts/{ad_account_id}/ad_groups/analyticsGet ad group analytics
PinterestSdkClient::AdAccountsApiad_groups_listGET /ad_accounts/{ad_account_id}/ad_groupsList ad groups
PinterestSdkClient::AdAccountsApiads_analyticsGET /ad_accounts/{ad_account_id}/ads/analyticsGet ad analytics
PinterestSdkClient::AdAccountsApiads_listGET /ad_accounts/{ad_account_id}/adsList ads
PinterestSdkClient::AdAccountsApianalytics_create_reportPOST /ad_accounts/{ad_account_id}/reportsCreate async request for an account analytics report
PinterestSdkClient::AdAccountsApianalytics_get_reportGET /ad_accounts/{ad_account_id}/reportsGet the account analytics report created by the async call
PinterestSdkClient::AdAccountsApicampaigns_analyticsGET /ad_accounts/{ad_account_id}/campaigns/analyticsGet campaign analytics
PinterestSdkClient::AdAccountsApicampaigns_listGET /ad_accounts/{ad_account_id}/campaignsList campaigns
PinterestSdkClient::AdAccountsApiproduct_groups_analyticsGET /ad_accounts/{ad_account_id}/product_groups/analyticsGet product group analytics
PinterestSdkClient::BoardsApiboard_sections_createPOST /boards/{board_id}/sectionsCreate board section
PinterestSdkClient::BoardsApiboard_sections_deleteDELETE /boards/{board_id}/sections/{section_id}Delete board section
PinterestSdkClient::BoardsApiboard_sections_listGET /boards/{board_id}/sectionsList board sections
PinterestSdkClient::BoardsApiboard_sections_list_pinsGET /boards/{board_id}/sections/{section_id}/pinsList Pins on board section
PinterestSdkClient::BoardsApiboard_sections_updatePATCH /boards/{board_id}/sections/{section_id}Update board section
PinterestSdkClient::BoardsApiboards_createPOST /boardsCreate board
PinterestSdkClient::BoardsApiboards_deleteDELETE /boards/{board_id}Delete board
PinterestSdkClient::BoardsApiboards_getGET /boards/{board_id}Get board
PinterestSdkClient::BoardsApiboards_listGET /boardsList boards
PinterestSdkClient::BoardsApiboards_list_pinsGET /boards/{board_id}/pinsList Pins on board
PinterestSdkClient::BoardsApiboards_updatePATCH /boards/{board_id}Update board
PinterestSdkClient::CatalogsApicatalogs_product_groups_createPOST /catalogs/product_groupsCreate product group
PinterestSdkClient::CatalogsApicatalogs_product_groups_deleteDELETE /catalogs/product_groups/{product_group_id}Delete product group
PinterestSdkClient::CatalogsApicatalogs_product_groups_listGET /catalogs/product_groupsGet product groups list
PinterestSdkClient::CatalogsApicatalogs_product_groups_updatePATCH /catalogs/product_groups/{product_group_id}Update product group
PinterestSdkClient::CatalogsApifeed_processing_results_listGET /catalogs/feeds/{feed_id}/processing_resultsList processing results for a given feed
PinterestSdkClient::CatalogsApifeeds_createPOST /catalogs/feedsCreate feed
PinterestSdkClient::CatalogsApifeeds_deleteDELETE /catalogs/feeds/{feed_id}Delete feed
PinterestSdkClient::CatalogsApifeeds_getGET /catalogs/feeds/{feed_id}Get feed
PinterestSdkClient::CatalogsApifeeds_listGET /catalogs/feedsList feeds
PinterestSdkClient::CatalogsApifeeds_updatePATCH /catalogs/feeds/{feed_id}Update feed
PinterestSdkClient::CatalogsApiitems_batch_getGET /catalogs/items/batch/{batch_id}Get catalogs items batch
PinterestSdkClient::CatalogsApiitems_batch_postPOST /catalogs/items/batchPerform an operation on an item batch
PinterestSdkClient::CatalogsApiitems_getGET /catalogs/itemsGet catalogs items
PinterestSdkClient::MediaApimedia_createPOST /mediaRegister media upload
PinterestSdkClient::MediaApimedia_getGET /media/{media_id}Get media upload details
PinterestSdkClient::MediaApimedia_listGET /mediaList media uploads
PinterestSdkClient::OauthApioauth_tokenPOST /oauth/tokenGenerate OAuth access token
PinterestSdkClient::PinsApipins_analyticsGET /pins/{pin_id}/analyticsGet Pin analytics
PinterestSdkClient::PinsApipins_createPOST /pinsCreate Pin
PinterestSdkClient::PinsApipins_deleteDELETE /pins/{pin_id}Delete Pin
PinterestSdkClient::PinsApipins_getGET /pins/{pin_id}Get Pin
PinterestSdkClient::UserAccountApiuser_account_analyticsGET /user_account/analyticsGet user account analytics
PinterestSdkClient::UserAccountApiuser_account_getGET /user_accountGet user account

Documentation for Models

Documentation for Authorization

basic

  • Type: HTTP basic authentication

pinterest_oauth2

  • Type: OAuth
  • Flow: accessCode
  • Authorization URL: https://www.pinterest.com/oauth/
  • Scopes:
    • ads:read: See all of your advertising data, including ads, ad groups, campaigns etc.
    • ads:write: Create, update, or delete ads, ad groups, campaigns etc.
    • boards:read: See your public boards, including group boards you join
    • boards:read_secret: See your secret boards
    • boards:write: Create, update, or delete your public boards
    • boards:write_secret: Create, update, or delete your secret boards
    • catalogs:read: See all of your catalogs data
    • catalogs:write: Create, update, or delete your catalogs data
    • pins:read: See your public Pins
    • pins:read_secret: See your secret Pins
    • pins:write: Create, update, or delete your public Pins
    • pins:write_secret: Create, update, or delete your secret Pins
    • user_accounts:read: See your user accounts

FAQs

Package last updated on 01 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc