Permalink
Please sign in to comment.
Showing
with
4,614 additions
and 0 deletions.
- +32 −0 .gitignore
- +15 −0 .travis.yml
- +2 −0 CHANGELOG
- +601 −0 Example/PinterestSDK.xcodeproj/project.pbxproj
- +7 −0 Example/PinterestSDK.xcodeproj/project.xcworkspace/contents.xcworkspacedata
- +96 −0 Example/PinterestSDK.xcodeproj/xcshareddata/xcschemes/PinterestSDK-Example.xcscheme
- +10 −0 Example/PinterestSDK.xcworkspace/contents.xcworkspacedata
- +53 −0 Example/PinterestSDK/Images.xcassets/AppIcon.appiconset/Contents.json
- +51 −0 Example/PinterestSDK/Images.xcassets/LaunchImage.launchimage/Contents.json
- BIN Example/PinterestSDK/Images.xcassets/XcodeScreenshot.png
- +15 −0 Example/PinterestSDK/PDKAppDelegate.h
- +58 −0 Example/PinterestSDK/PDKAppDelegate.m
- +30 −0 Example/PinterestSDK/PDKBoardCell.h
- +77 −0 Example/PinterestSDK/PDKBoardCell.m
- +114 −0 Example/PinterestSDK/PDKBoardCell.xib
- +13 −0 Example/PinterestSDK/PDKBoardsViewController.h
- +253 −0 Example/PinterestSDK/PDKBoardsViewController.m
- +14 −0 Example/PinterestSDK/PDKPinCell.h
- +45 −0 Example/PinterestSDK/PDKPinCell.m
- +19 −0 Example/PinterestSDK/PDKPinsViewController.h
- +118 −0 Example/PinterestSDK/PDKPinsViewController.m
- +13 −0 Example/PinterestSDK/PDKViewController.h
- +187 −0 Example/PinterestSDK/PDKViewController.m
- +56 −0 Example/PinterestSDK/PinterestSDK-Info.plist
- +16 −0 Example/PinterestSDK/PinterestSDK-Prefix.pch
- +18 −0 Example/PinterestSDK/main.m
- +12 −0 Example/Podfile
- +54 −0 Example/Podfile.lock
- +22 −0 Example/Tests/Tests-Info.plist
- +13 −0 Example/Tests/Tests-Prefix.pch
- +43 −0 Example/Tests/Tests.m
- +19 −0 LICENSE
- +31 −0 PinterestSDK.podspec
- 0 Pod/Assets/.gitkeep
- 0 Pod/Classes/.gitkeep
- +56 −0 Pod/Classes/PDKBoard.h
- +44 −0 Pod/Classes/PDKBoard.m
- +19 −0 Pod/Classes/PDKCategories.h
- +86 −0 Pod/Classes/PDKCategories.m
- +388 −0 Pod/Classes/PDKClient.h
- +647 −0 Pod/Classes/PDKClient.m
- +36 −0 Pod/Classes/PDKImageInfo.h
- +26 −0 Pod/Classes/PDKImageInfo.m
- +34 −0 Pod/Classes/PDKInterest.h
- +28 −0 Pod/Classes/PDKInterest.m
- +67 −0 Pod/Classes/PDKModelObject.h
- +72 −0 Pod/Classes/PDKModelObject.m
- +108 −0 Pod/Classes/PDKPin.h
- +139 −0 Pod/Classes/PDKPin.m
- +196 −0 Pod/Classes/PDKResponseObject.h
- +186 −0 Pod/Classes/PDKResponseObject.m
- +67 −0 Pod/Classes/PDKUser.h
- +47 −0 Pod/Classes/PDKUser.m
- +15 −0 Pod/Classes/PinterestSDK.h
- +246 −0 README.md
32
.gitignore
| @@ -0,0 +1,32 @@ | ||
| +# OS X | ||
| +.DS_Store | ||
| + | ||
| +# Xcode | ||
| +build/ | ||
| +*.pbxuser | ||
| +!default.pbxuser | ||
| +*.mode1v3 | ||
| +!default.mode1v3 | ||
| +*.mode2v3 | ||
| +!default.mode2v3 | ||
| +*.perspectivev3 | ||
| +!default.perspectivev3 | ||
| +xcuserdata | ||
| +*.xccheckout | ||
| +profile | ||
| +*.moved-aside | ||
| +DerivedData | ||
| +*.hmap | ||
| +*.ipa | ||
| + | ||
| +# Bundler | ||
| +.bundle | ||
| + | ||
| +# We recommend against adding the Pods directory to your .gitignore. However | ||
| +# you should judge for yourself, the pros and cons are mentioned at: | ||
| +# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control | ||
| +# | ||
| +# Note: if you ignore the Pods directory, make sure to uncomment | ||
| +# `pod install` in .travis.yml | ||
| +# | ||
| +Pods/ |
15
.travis.yml
| @@ -0,0 +1,15 @@ | ||
| +# references: | ||
| +# * http://www.objc.io/issue-6/travis-ci.html | ||
| +# * https://github.com/supermarin/xcpretty#usage | ||
| + | ||
| +language: objective-c | ||
| +# cache: cocoapods | ||
| +# podfile: Example/Podfile | ||
| +# before_install: | ||
| +# - gem install cocoapods # Since Travis is not always on latest version | ||
| +- pod install --project-directory=Example | ||
| +install: | ||
| +- gem install xcpretty --no-rdoc --no-ri --no-document --quiet | ||
| +script: | ||
| +- set -o pipefail && xcodebuild test -workspace Example/PinterestSDK.xcworkspace -scheme PinterestSDK-Example -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO | xcpretty -c | ||
| +- pod lib lint --quick |
| @@ -0,0 +1,2 @@ | ||
| +1.0 | ||
| +- Initial release |
| @@ -0,0 +1,7 @@ | ||
| +<?xml version="1.0" encoding="UTF-8"?> | ||
| +<Workspace | ||
| + version = "1.0"> | ||
| + <FileRef | ||
| + location = "self:PinterestSDK.xcodeproj"> | ||
| + </FileRef> | ||
| +</Workspace> |
| @@ -0,0 +1,96 @@ | ||
| +<?xml version="1.0" encoding="UTF-8"?> | ||
| +<Scheme | ||
| + LastUpgradeVersion = "0600" | ||
| + version = "1.3"> | ||
| + <BuildAction | ||
| + parallelizeBuildables = "YES" | ||
| + buildImplicitDependencies = "YES"> | ||
| + <BuildActionEntries> | ||
| + <BuildActionEntry | ||
| + buildForTesting = "YES" | ||
| + buildForRunning = "YES" | ||
| + buildForProfiling = "YES" | ||
| + buildForArchiving = "YES" | ||
| + buildForAnalyzing = "YES"> | ||
| + <BuildableReference | ||
| + BuildableIdentifier = "primary" | ||
| + BlueprintIdentifier = "6003F589195388D20070C39A" | ||
| + BuildableName = "PinterestSDK.app" | ||
| + BlueprintName = "PinterestSDK" | ||
| + ReferencedContainer = "container:PinterestSDK.xcodeproj"> | ||
| + </BuildableReference> | ||
| + </BuildActionEntry> | ||
| + </BuildActionEntries> | ||
| + </BuildAction> | ||
| + <TestAction | ||
| + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
| + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
| + shouldUseLaunchSchemeArgsEnv = "YES" | ||
| + buildConfiguration = "Debug"> | ||
| + <Testables> | ||
| + <TestableReference | ||
| + skipped = "NO"> | ||
| + <BuildableReference | ||
| + BuildableIdentifier = "primary" | ||
| + BlueprintIdentifier = "6003F5AD195388D20070C39A" | ||
| + BuildableName = "Tests.xctest" | ||
| + BlueprintName = "Tests" | ||
| + ReferencedContainer = "container:PinterestSDK.xcodeproj"> | ||
| + </BuildableReference> | ||
| + </TestableReference> | ||
| + </Testables> | ||
| + <MacroExpansion> | ||
| + <BuildableReference | ||
| + BuildableIdentifier = "primary" | ||
| + BlueprintIdentifier = "6003F589195388D20070C39A" | ||
| + BuildableName = "PinterestSDK.app" | ||
| + BlueprintName = "PinterestSDK" | ||
| + ReferencedContainer = "container:PinterestSDK.xcodeproj"> | ||
| + </BuildableReference> | ||
| + </MacroExpansion> | ||
| + </TestAction> | ||
| + <LaunchAction | ||
| + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
| + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
| + launchStyle = "0" | ||
| + useCustomWorkingDirectory = "NO" | ||
| + buildConfiguration = "Debug" | ||
| + ignoresPersistentStateOnLaunch = "NO" | ||
| + debugDocumentVersioning = "YES" | ||
| + allowLocationSimulation = "YES"> | ||
| + <BuildableProductRunnable> | ||
| + <BuildableReference | ||
| + BuildableIdentifier = "primary" | ||
| + BlueprintIdentifier = "6003F589195388D20070C39A" | ||
| + BuildableName = "PinterestSDK.app" | ||
| + BlueprintName = "PinterestSDK" | ||
| + ReferencedContainer = "container:PinterestSDK.xcodeproj"> | ||
| + </BuildableReference> | ||
| + </BuildableProductRunnable> | ||
| + <AdditionalOptions> | ||
| + </AdditionalOptions> | ||
| + </LaunchAction> | ||
| + <ProfileAction | ||
| + shouldUseLaunchSchemeArgsEnv = "YES" | ||
| + savedToolIdentifier = "" | ||
| + useCustomWorkingDirectory = "NO" | ||
| + buildConfiguration = "Release" | ||
| + debugDocumentVersioning = "YES"> | ||
| + <BuildableProductRunnable> | ||
| + <BuildableReference | ||
| + BuildableIdentifier = "primary" | ||
| + BlueprintIdentifier = "6003F589195388D20070C39A" | ||
| + BuildableName = "PinterestSDK.app" | ||
| + BlueprintName = "PinterestSDK" | ||
| + ReferencedContainer = "container:PinterestSDK.xcodeproj"> | ||
| + </BuildableReference> | ||
| + </BuildableProductRunnable> | ||
| + </ProfileAction> | ||
| + <AnalyzeAction | ||
| + buildConfiguration = "Debug"> | ||
| + </AnalyzeAction> | ||
| + <ArchiveAction | ||
| + buildConfiguration = "Release" | ||
| + revealArchiveInOrganizer = "YES"> | ||
| + </ArchiveAction> | ||
| +</Scheme> |
| @@ -0,0 +1,10 @@ | ||
| +<?xml version="1.0" encoding="UTF-8"?> | ||
| +<Workspace | ||
| + version = "1.0"> | ||
| + <FileRef | ||
| + location = "group:PinterestSDK.xcodeproj"> | ||
| + </FileRef> | ||
| + <FileRef | ||
| + location = "group:Pods/Pods.xcodeproj"> | ||
| + </FileRef> | ||
| +</Workspace> |
| @@ -0,0 +1,53 @@ | ||
| +{ | ||
| + "images" : [ | ||
| + { | ||
| + "idiom" : "iphone", | ||
| + "size" : "29x29", | ||
| + "scale" : "2x" | ||
| + }, | ||
| + { | ||
| + "idiom" : "iphone", | ||
| + "size" : "40x40", | ||
| + "scale" : "2x" | ||
| + }, | ||
| + { | ||
| + "idiom" : "iphone", | ||
| + "size" : "60x60", | ||
| + "scale" : "2x" | ||
| + }, | ||
| + { | ||
| + "idiom" : "ipad", | ||
| + "size" : "29x29", | ||
| + "scale" : "1x" | ||
| + }, | ||
| + { | ||
| + "idiom" : "ipad", | ||
| + "size" : "29x29", | ||
| + "scale" : "2x" | ||
| + }, | ||
| + { | ||
| + "idiom" : "ipad", | ||
| + "size" : "40x40", | ||
| + "scale" : "1x" | ||
| + }, | ||
| + { | ||
| + "idiom" : "ipad", | ||
| + "size" : "40x40", | ||
| + "scale" : "2x" | ||
| + }, | ||
| + { | ||
| + "idiom" : "ipad", | ||
| + "size" : "76x76", | ||
| + "scale" : "1x" | ||
| + }, | ||
| + { | ||
| + "idiom" : "ipad", | ||
| + "size" : "76x76", | ||
| + "scale" : "2x" | ||
| + } | ||
| + ], | ||
| + "info" : { | ||
| + "version" : 1, | ||
| + "author" : "xcode" | ||
| + } | ||
| +} |
| @@ -0,0 +1,51 @@ | ||
| +{ | ||
| + "images" : [ | ||
| + { | ||
| + "orientation" : "portrait", | ||
| + "idiom" : "iphone", | ||
| + "extent" : "full-screen", | ||
| + "minimum-system-version" : "7.0", | ||
| + "scale" : "2x" | ||
| + }, | ||
| + { | ||
| + "orientation" : "portrait", | ||
| + "idiom" : "iphone", | ||
| + "subtype" : "retina4", | ||
| + "extent" : "full-screen", | ||
| + "minimum-system-version" : "7.0", | ||
| + "scale" : "2x" | ||
| + }, | ||
| + { | ||
| + "orientation" : "portrait", | ||
| + "idiom" : "ipad", | ||
| + "extent" : "full-screen", | ||
| + "minimum-system-version" : "7.0", | ||
| + "scale" : "1x" | ||
| + }, | ||
| + { | ||
| + "orientation" : "landscape", | ||
| + "idiom" : "ipad", | ||
| + "extent" : "full-screen", | ||
| + "minimum-system-version" : "7.0", | ||
| + "scale" : "1x" | ||
| + }, | ||
| + { | ||
| + "orientation" : "portrait", | ||
| + "idiom" : "ipad", | ||
| + "extent" : "full-screen", | ||
| + "minimum-system-version" : "7.0", | ||
| + "scale" : "2x" | ||
| + }, | ||
| + { | ||
| + "orientation" : "landscape", | ||
| + "idiom" : "ipad", | ||
| + "extent" : "full-screen", | ||
| + "minimum-system-version" : "7.0", | ||
| + "scale" : "2x" | ||
| + } | ||
| + ], | ||
| + "info" : { | ||
| + "version" : 1, | ||
| + "author" : "xcode" | ||
| + } | ||
| +} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
| @@ -0,0 +1,15 @@ | ||
| +// | ||
| +// PDKAppDelegate.h | ||
| +// PinterestSDK | ||
| +// | ||
| +// Created by CocoaPods on 01/28/2015. | ||
| +// Copyright (c) 2014 ricky cancro. All rights reserved. | ||
| +// | ||
| + | ||
| +#import <UIKit/UIKit.h> | ||
| + | ||
| +@interface PDKAppDelegate : UIResponder <UIApplicationDelegate> | ||
| + | ||
| +@property (strong, nonatomic) UIWindow *window; | ||
| + | ||
| +@end |
| @@ -0,0 +1,58 @@ | ||
| +// | ||
| +// PDKAppDelegate.m | ||
| +// PinterestSDK | ||
| +// | ||
| +// Created by CocoaPods on 01/28/2015. | ||
| +// Copyright (c) 2014 ricky cancro. All rights reserved. | ||
| +// | ||
| + | ||
| +#import "PDKAppDelegate.h" | ||
| +#import "PDKViewController.h" | ||
| +#import "PDKClient.h" | ||
| + | ||
| +static NSString * const kPDKExampleFakeAppId = @"4759388231231868449"; | ||
| + | ||
| +@implementation PDKAppDelegate | ||
| + | ||
| +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | ||
| +{ | ||
| + [PDKClient configureSharedInstanceWithAppId:kPDKExampleFakeAppId]; | ||
| + self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; | ||
| + self.window.rootViewController = [[UINavigationController alloc] initWithRootViewController:[[PDKViewController alloc] init]]; | ||
| + [self.window makeKeyAndVisible]; | ||
| + return YES; | ||
| +} | ||
| + | ||
| +- (void)applicationWillResignActive:(UIApplication *)application | ||
| +{ | ||
| + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. | ||
| + // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. | ||
| +} | ||
| + | ||
| +- (void)applicationDidEnterBackground:(UIApplication *)application | ||
| +{ | ||
| + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. | ||
| + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. | ||
| +} | ||
| + | ||
| +- (void)applicationWillEnterForeground:(UIApplication *)application | ||
| +{ | ||
| + // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. | ||
| +} | ||
| + | ||
| +- (void)applicationDidBecomeActive:(UIApplication *)application | ||
| +{ | ||
| + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. | ||
| +} | ||
| + | ||
| +- (void)applicationWillTerminate:(UIApplication *)application | ||
| +{ | ||
| + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. | ||
| +} | ||
| + | ||
| +- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url | ||
| +{ | ||
| + return [[PDKClient sharedInstance] handleCallbackURL:url]; | ||
| +} | ||
| + | ||
| +@end |
| @@ -0,0 +1,30 @@ | ||
| +// | ||
| +// PDKBoardCell.h | ||
| +// PinterestSDK | ||
| +// | ||
| +// Created by Ricky Cancro on 3/14/15. | ||
| +// Copyright (c) 2015 ricky cancro. All rights reserved. | ||
| +// | ||
| + | ||
| +@import UIKit; | ||
| +@class PDKBoard; | ||
| + | ||
| +typedef void (^PDKBoardCellActionBlock)(); | ||
| + | ||
| +@interface PDKBoardCell : UITableViewCell | ||
| +@property (nonatomic, strong) IBOutlet UIImageView *boardImageView; | ||
| +@property (nonatomic, strong) IBOutlet UILabel *percentageLabel; | ||
| +@property (nonatomic, strong) IBOutlet UILabel *boardNameLabel; | ||
| +@property (nonatomic, strong) IBOutlet UILabel *boardDescriptionLabel; | ||
| + | ||
| +@property (nonatomic, copy) PDKBoardCellActionBlock addPinFromURLBlock; | ||
| +@property (nonatomic, copy) PDKBoardCellActionBlock addPinFromImageBlock; | ||
| + | ||
| +- (IBAction)addPinFromURL:(id)sender; | ||
| +- (IBAction)addPinFromImage:(id)sender; | ||
| + | ||
| +- (void)updateWithBoard:(PDKBoard *)board; | ||
| + | ||
| +- (void)showSpinner:(BOOL)show withPercentage:(CGFloat)percentage; | ||
| +- (void)enableButtons:(BOOL)doEnable; | ||
| +@end |
Oops, something went wrong.
0 comments on commit
557fc57