All Projects → pinterest → Ios Pdk

pinterest / Ios Pdk

Licence: mit
Pinterest iOS SDK

Projects that are alternatives of or similar to Ios Pdk

Android Pdk
Pinterest Android SDK
Stars: ✭ 49 (-57.02%)
Mutual labels:  api, pinterest, sdk
Domo Python Sdk
Python3 - Domo API SDK
Stars: ✭ 64 (-43.86%)
Mutual labels:  api, sdk
Openapi Generator
OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
Stars: ✭ 10,634 (+9228.07%)
Mutual labels:  api, sdk
Modio Sdk Legacy
SDK for integrating mod.io into your game - a modding API for game developers
Stars: ✭ 75 (-34.21%)
Mutual labels:  api, sdk
Gopay Php Api
GoPay's PHP SDK for Payments REST API
Stars: ✭ 53 (-53.51%)
Mutual labels:  api, sdk
Openrouteservice R
🌐 R package to query openrouteservice.org
Stars: ✭ 57 (-50%)
Mutual labels:  api, sdk
Foal
Elegant and all-inclusive Node.Js web framework based on TypeScript. 🚀.
Stars: ✭ 1,176 (+931.58%)
Mutual labels:  api, sdk
Shopify Api Php
🚀 Shopify API Client for PHP
Stars: ✭ 100 (-12.28%)
Mutual labels:  api, sdk
Amadeus Node
Node library for the Amadeus Self-Service travel APIs
Stars: ✭ 91 (-20.18%)
Mutual labels:  api, sdk
Uploadcare Php
PHP API client that handles uploads and further operations with files by wrapping Uploadcare Upload and REST APIs.
Stars: ✭ 77 (-32.46%)
Mutual labels:  api, sdk
Iextrading4j
IEX Cloud open source API wrapper
Stars: ✭ 112 (-1.75%)
Mutual labels:  api, sdk
Flickr Sdk
Almost certainly the best Flickr API client in the world for node and the browser
Stars: ✭ 104 (-8.77%)
Mutual labels:  api, sdk
Modio Unity
Unity Plugin for integrating mod.io - a modding API for game developers
Stars: ✭ 53 (-53.51%)
Mutual labels:  api, sdk
Nestia
Automatic SDK and Document generator for the NestJS
Stars: ✭ 57 (-50%)
Mutual labels:  api, sdk
Js Api Client
Typeform API js client
Stars: ✭ 51 (-55.26%)
Mutual labels:  api, sdk
Directus Docker
Directus 6 Docker — Legacy Container [EOL]
Stars: ✭ 68 (-40.35%)
Mutual labels:  api, sdk
Waliyun
阿里云Node.js Open API SDK(完整版)
Stars: ✭ 40 (-64.91%)
Mutual labels:  api, sdk
Nodejs
Everything related to the Node.js ecosystem for the commercetools platform.
Stars: ✭ 47 (-58.77%)
Mutual labels:  api, sdk
Huobi golang
Go SDK for Huobi Spot API
Stars: ✭ 76 (-33.33%)
Mutual labels:  api, sdk
Go Sdk
A composable toolbox of libraries to build everything from CLIs to enterprise applications.
Stars: ✭ 103 (-9.65%)
Mutual labels:  api, sdk

Caveat -- Deprecation

Pinterest considers this SDK deprecated. You can still build an integration with Pinterest into your iOS app using the RESTful endpoints directly. Best practice guidelines exist about use of OAuth within a mobile application. For instance, see RFC 8252.

For documentation on the API itself, visit the Pinterest Developers website.

PinterestSDK for iOS

The PinterestSDK for iOS will allow you to authenticate an account with Pinterest and make requests on behalf of the authenticated user. For details on the supported endpoint, visit the Pinterest API.

Installation

The PinterestSDK is a cocoapod. In order to use it you will need to create a Podfile if you do not already have one. Information on installing cocoapods and creating a Podfile can be found at Cocoapods.org. (Hint — to install cocoapods, run sudo gem install cocoapods from the command line; to create a Podfile, run pod init).

Open up the Podfile and add the following dependency:

pod "PinterestSDK", :git => "https://github.com/pinterest/ios-pdk.git"

Save your Podfile and run 'pod install' from the command line.

You can also just give the example app a try:

pod try https://github.com/pinterest/ios-pdk.git

Setting up your App

Registering Your App

Visit the Pinterest Developer Site and register your application. This will generate an appId for you which you will need in the next steps. Make sure to add your redirect URIs. For iOS your redirect URI will be pdk[your-appId]. For example, if you appId is 1234 your redirect URI will be pdk1234.

Configuring Xcode

The PinterestSDK will authenticate using OAuth either via the Pinterest app or, if the Pinterest app isn't installed, Safari. In order to redirect back to your app after authentication you will need set up a custom URL scheme. To do this, go to your app's plist and add a URL scheme named pdk[your-appId].

Xcode Screenshot

Configuring PDKClient

Before you make any calls using the PDKClient in your app, you will need to configure it with your appId:

[PDKClient configureSharedInstanceWithAppId:@"12345"];

The end of application:didFinishLaunchingWithOptions: seems like a reasonable place.

Authenticating

To authenticate a user, call authenticateWithPermissions:withSuccess:andFailure: on PDKClient. If the current auth token isn't valid or this is the first time you've requested a token, this call will cause an app switch to either the Pinterest app or Safari. To handle the switch back to your app, implement your app's application:openURL:sourceApplication:annotation: as follows:

- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
{
  return [[PDKClient sharedInstance] handleCallbackURL:url];
}

For iOS9 and latter application:openURL:sourceApplication:annotation: was deprecated, so you should implement application:openURL:options as follows:

- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString *,id> *)options
{
  return [[PDKClient sharedInstance] handleCallbackURL:url];
}

Example App

A good place to start exploring the PDK is with the example app. To run it browse to the Example directory and run pod install. Next open PinterestSDK.xcworkspace in XCode and run it.

Documentation

For the full documentation and more information about the Pinterest Developer Platform, please visit:

PinterestSDK for iOS

Pinterest API Docs

Pinterest API signup

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].