├── .gitmodules
├── AppFiguresAPI.xcodeproj
├── xcuserdata
│ └── kylehickinson.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints.xcbkptlist
│ │ └── xcschemes
│ │ ├── xcschememanagement.plist
│ │ └── AppFiguresAPI.xcscheme
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcuserdata
│ │ └── kylehickinson.xcuserdatad
│ │ ├── UserInterfaceState.xcuserstate
│ │ └── WorkspaceSettings.xcsettings
└── project.pbxproj
├── AppFiguresAPI
├── AppFiguresAPI-Prefix.pch
├── APConstants.h
├── APDateRange.h
├── APAuthentication.h
├── APDateRange.m
├── APEvent.h
├── APRankData.h
├── APRegionSalesReport.h
├── APAuthentication.m
├── APiAdReport.h
├── APAccount.h
├── APReview.h
├── APUser.h
├── APiAdTransaction.h
├── APSalesTransaction.h
├── APArchive.h
├── APExternalAccount.h
├── APTransaction.h
├── APStoreRating.h
├── APProduct.h
├── APRankTransaction.h
├── APUserTransaction.h
├── APReviewTransaction.h
├── APEvent.m
├── APRankData.m
├── APAccount.m
├── APEventTransaction.h
├── APTransaction.m
├── APArchiveTransaction.h
├── APRegionSalesReport.m
├── APSalesReport.h
├── APiAdReport.m
├── APArchive.m
├── APRequest.h
├── APExternalAccountTransaction.h
├── AppFiguresAPI.h
├── APExternalAccount.m
├── APReview.m
├── APProduct.m
├── AppFiguresAPI.m
├── APUserTransaction.m
├── APUser.m
├── APSalesReport.m
├── APReviewTransaction.m
├── APStoreRating.m
├── APiAdTransaction.m
├── APArchiveTransaction.m
├── APEventTransaction.m
├── APRankTransaction.m
├── APExternalAccountTransaction.m
├── APSalesTransaction.m
└── APRequest.m
└── .gitignore
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "lib/JSONKit"]
2 | path = lib/JSONKit
3 | url = git://github.com/johnezang/JSONKit.git
4 |
--------------------------------------------------------------------------------
/AppFiguresAPI.xcodeproj/xcuserdata/kylehickinson.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/AppFiguresAPI/AppFiguresAPI-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header for all source files of the 'AppFiguresAPI' target in the 'AppFiguresAPI' project
3 | //
4 |
5 | #ifdef __OBJC__
6 | #import
7 | #endif
8 |
--------------------------------------------------------------------------------
/AppFiguresAPI.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/AppFiguresAPI.xcodeproj/project.xcworkspace/xcuserdata/kylehickinson.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sync/AppFiguresAPI/master/AppFiguresAPI.xcodeproj/project.xcworkspace/xcuserdata/kylehickinson.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | build/*
3 | *.pbxuser
4 | !default.pbxuser
5 | *.mode1v3
6 | !default.mode1v3
7 | *.mode2v3
8 | !default.mode2v3
9 | *.perspectivev3
10 | !default.perspectivev3
11 | *.xcworkspace
12 | !default.xcworkspace
13 | xcuserdata
14 | profile
15 | *.moved-aside
16 | .DS_Store
--------------------------------------------------------------------------------
/AppFiguresAPI/APConstants.h:
--------------------------------------------------------------------------------
1 | //
2 | // APConstants.h
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-11-29.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #define kAPUserAgent @"AppFiguresApp"
10 | #define kAPBaseURL @"https://api.appfigures.com/v1.1/"
--------------------------------------------------------------------------------
/AppFiguresAPI.xcodeproj/project.xcworkspace/xcuserdata/kylehickinson.xcuserdatad/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEWorkspaceUserSettings_HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges
6 |
7 | IDEWorkspaceUserSettings_SnapshotAutomaticallyBeforeSignificantChanges
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APDateRange.h:
--------------------------------------------------------------------------------
1 | //
2 | // APDateRange.h
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-11-29.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface APDateRange : NSObject
12 | @property (nonatomic, strong) NSDate *from;
13 | @property (nonatomic, strong) NSDate *to;
14 |
15 | + (APDateRange *)dateRangeFrom:(NSDate *)from to:(NSDate *)to;
16 | - (id)initWithDateFrom:(NSDate *)from to:(NSDate *)to;
17 | @end
18 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APAuthentication.h:
--------------------------------------------------------------------------------
1 | //
2 | // APAuthentication.h
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-11-29.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface APAuthentication : NSObject
12 | @property (nonatomic, copy) NSString *username;
13 | @property (nonatomic, copy) NSString *password;
14 |
15 | + (APAuthentication *)authWithUsername:(NSString *)username password:(NSString *)password;
16 | - (id)initWithUsername:(NSString *)username password:(NSString *)password;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APDateRange.m:
--------------------------------------------------------------------------------
1 | //
2 | // APDateRange.m
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-11-29.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import "APDateRange.h"
10 |
11 | @implementation APDateRange
12 |
13 | + (APDateRange *)dateRangeFrom:(NSDate *)from to:(NSDate *)to
14 | {
15 | return [[APDateRange alloc] initWithDateFrom:from to:to];
16 | }
17 |
18 | - (id)initWithDateFrom:(NSDate *)from to:(NSDate *)to
19 | {
20 | if ((self = [super init])) {
21 |
22 | }
23 | return self;
24 | }
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APEvent.h:
--------------------------------------------------------------------------------
1 | //
2 | // APEvent.h
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-12-05.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface APEvent : NSObject
12 |
13 | - (id)initWithResponse:(NSDictionary *)response;
14 |
15 | @property (readonly) NSUInteger eventID;
16 | @property (readonly) NSUInteger accountID;
17 | @property (readonly) NSString *caption;
18 | @property (readonly) NSString *date;
19 | @property (readonly) NSString *origin;
20 | @property (readonly) NSArray *productIDs;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APRankData.h:
--------------------------------------------------------------------------------
1 | //
2 | // APRankData.h
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-11-29.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface APRankData : NSObject
12 |
13 | - (id)initWithResponse:(NSDictionary *)response;
14 |
15 | @property (readonly) NSUInteger productID;
16 | @property (readonly) NSUInteger countryID;
17 | @property (readonly) NSUInteger categoryID;
18 | @property (readonly) NSString *subcategory;
19 | @property (readonly) NSUInteger rankPosition;
20 | @property (readonly) NSInteger delta;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/AppFiguresAPI.xcodeproj/xcuserdata/kylehickinson.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | AppFiguresAPI.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | A13F2C6F1484A7BD00F71B2F
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APRegionSalesReport.h:
--------------------------------------------------------------------------------
1 | //
2 | // APRegionSalesReport.h
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-11-29.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface APRegionSalesReport : NSObject
12 |
13 | - (id)initWithResponse:(NSDictionary *)response;
14 |
15 | @property (readonly) NSUInteger regionID;
16 | @property (readonly) NSString *regionName;
17 | @property (readonly) NSString *currency;
18 | @property (readonly) NSUInteger returns;
19 | @property (readonly) NSUInteger units;
20 | @property (readonly) NSString *convertedRevenue;
21 | @property (readonly) NSString *baseRevenue;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APAuthentication.m:
--------------------------------------------------------------------------------
1 | //
2 | // APAuthentication.m
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-11-29.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import "APAuthentication.h"
10 |
11 | @implementation APAuthentication
12 |
13 | + (APAuthentication *)authWithUsername:(NSString *)username password:(NSString *)password
14 | {
15 | return [[APAuthentication alloc] initWithUsername:username password:password];
16 | }
17 |
18 | - (id)initWithUsername:(NSString *)username password:(NSString *)password
19 | {
20 | if ((self = [super init])) {
21 | self.username = username;
22 | self.password = password;
23 | }
24 | return self;
25 | }
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APiAdReport.h:
--------------------------------------------------------------------------------
1 | //
2 | // APiAdReport.h
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-12-04.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface APiAdReport : NSObject
12 |
13 | - (id)initWithResponse:(NSDictionary *)response;
14 |
15 | @property (readonly) NSString *country;
16 | @property (readonly) NSString *countryISO;
17 | @property (readonly) NSString *timestamp;
18 | @property (readonly) float revenue;
19 | @property (readonly) NSUInteger requests;
20 | @property (readonly) NSUInteger impressions;
21 | @property (readonly) float ECPM;
22 | @property (readonly) float fillRate;
23 | @property (readonly) float clickThroughRate;
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APAccount.h:
--------------------------------------------------------------------------------
1 | //
2 | // APAccount.h
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-12-05.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | extern NSString * const APAccountPlanTypeFree;
12 | extern NSString * const APAccountPlanTypePremium;
13 | extern NSString * const APAccountPlanTypePublisher;
14 |
15 | typedef NSString * APAccountPlanType;
16 |
17 | @interface APAccount : NSObject
18 |
19 | - (id)initWithResponse:(NSDictionary *)response;
20 |
21 | @property (readonly) NSUInteger accountID;
22 | @property (readonly) NSString *companyName;
23 | @property (readonly) NSString *autoImport;
24 | @property (readonly) NSString *lastImport;
25 | @property (readonly) APAccountPlanType plan;
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APReview.h:
--------------------------------------------------------------------------------
1 | //
2 | // APReview.h
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-12-04.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface APReview : NSObject
12 | - (id)initWithResponse:(NSDictionary *)response;
13 |
14 | @property (readonly) NSUInteger reviewID;
15 | @property (readonly) NSString *title;
16 | @property (readonly) NSString *review;
17 | @property (readonly) NSString *originalTitle;
18 | @property (readonly) NSString *originalReview;
19 | @property (readonly) NSString *author;
20 | @property (readonly) NSString *version;
21 | @property (readonly) NSString *date;
22 | @property (readonly) NSUInteger stars;
23 | @property (readonly) NSString *type;
24 | @property (readonly) NSString *reviewType;
25 | @property (readonly) NSString *countryISO;
26 | @property (readonly) NSString *country;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APUser.h:
--------------------------------------------------------------------------------
1 | //
2 | // APUser.h
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-12-05.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "APAccount.h"
11 | #import "APProduct.h"
12 |
13 | @interface APUser : NSObject
14 |
15 | - (id)initWithResponse:(NSDictionary *)response;
16 |
17 | @property (readonly) NSString *currency;
18 | @property (readonly) NSString *region;
19 | @property (readonly) BOOL isOwner;
20 | @property (readonly) float shareOfProfit;
21 | @property (readonly) NSString *lastLogin;
22 | @property (readonly) NSString *timezone;
23 | @property (readonly) APAccount *account;
24 | @property (readonly) NSUInteger userID;
25 | @property (readonly) NSString *role;
26 | @property (readonly) NSString *name;
27 | @property (readonly) NSString *email;
28 | @property (readonly) NSArray *products;
29 | @property (readonly) NSString *dateFormat;
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APiAdTransaction.h:
--------------------------------------------------------------------------------
1 | //
2 | // APiAdTransaction.h
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-12-04.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import "APTransaction.h"
10 | #import "APDateRange.h"
11 | #import "APiAdReport.h"
12 |
13 | @class APiAdTransaction;
14 |
15 | extern NSString * const APiAdReportTypeDates;
16 | extern NSString * const APiAdReportTypeCountries;
17 |
18 | typedef NSString * APiAdReportType;
19 |
20 | typedef void (^APiAdTransactionCompleted)(APiAdTransaction *transaction, NSDictionary *results);
21 |
22 | @interface APiAdTransaction : APTransaction
23 |
24 | - (void)beginTransaction;
25 |
26 | @property (nonatomic, copy) APiAdReportType type;
27 | @property (nonatomic, strong) APDateRange *dateRange;
28 | @property (nonatomic, strong) NSArray *products;
29 | @property (nonatomic, copy) APiAdTransactionCompleted transactionCompleted;
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APSalesTransaction.h:
--------------------------------------------------------------------------------
1 | //
2 | // APSalesTransaction.h
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-11-29.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "APTransaction.h"
11 | #import "APSalesReport.h"
12 |
13 | @class APSalesTransaction;
14 | @class APDateRange;
15 |
16 | typedef void (^APSalesTransactionCompleted)(APSalesTransaction *transaction, NSDictionary *results);
17 |
18 | @interface APSalesTransaction : APTransaction
19 | @property (nonatomic, copy) APSalesDataSource dataSource;
20 | @property (nonatomic, copy) APSalesType type;
21 | @property (nonatomic, strong) APDateRange *dateRange;
22 | @property (nonatomic, strong) NSArray *products;
23 | @property (nonatomic, strong) NSString *countryISO;
24 |
25 | @property (nonatomic, copy) APSalesTransactionCompleted transactionCompleted;
26 |
27 | - (void)beginTransaction;
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APArchive.h:
--------------------------------------------------------------------------------
1 | //
2 | // APArchive.h
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-12-04.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | extern NSString * const APArchiveTypeDaily;
12 | extern NSString * const APArchiveTypeWeekly;
13 | extern NSString * const APArchiveTypeFinancial;
14 | extern NSString * const APArchiveTypePayment;
15 | extern NSString * const APArchiveTypeAll;
16 |
17 | typedef NSString * APArchiveType;
18 |
19 | @interface APArchive : NSObject
20 |
21 | - (id)initWithResponse:(NSDictionary *)response;
22 |
23 | @property (readonly) NSUInteger archiveID;
24 | @property (readonly) APArchiveType type;
25 | @property (readonly) NSUInteger itcID;
26 | @property (readonly) NSString *reportTimestamp;
27 | @property (readonly) NSString *importTimestamp;
28 | @property (readonly) NSString *importMethod;
29 | @property (readonly) NSString *region;
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APExternalAccount.h:
--------------------------------------------------------------------------------
1 | //
2 | // APExternalAccount.h
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-12-05.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | extern NSString * const APExternalAccountTypeITC;
12 | extern NSString * const APExternalAccountTypeAndroidMarket;
13 | extern NSString * const APExternalAccountTypeGoogleCheckout;
14 |
15 | typedef NSString * APExternalAccountType;
16 |
17 | @interface APExternalAccount : NSObject
18 | - (id)initWithResponse:(NSDictionary *)response;
19 |
20 | @property (readonly) NSUInteger appFiguresID;
21 | @property (readonly) NSUInteger accountID;
22 | @property (readonly) NSString *nickname;
23 | @property (readonly) NSString *username;
24 | @property (readonly) BOOL autoImports;
25 | @property (readonly) BOOL hasiAds;
26 | @property (readonly) NSUInteger typeID;
27 | @property (readonly) APExternalAccountType type;
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APTransaction.h:
--------------------------------------------------------------------------------
1 | //
2 | // APTransaction.h
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-11-29.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "APRequest.h"
11 |
12 | @class APTransaction;
13 |
14 | typedef void (^APTransactionFailed)(APTransaction *transaction, NSError *error);
15 |
16 | @interface APTransaction : NSObject
17 | @property (nonatomic, strong) NSURLConnection *connection;
18 | @property (nonatomic, strong) NSURL *URL;
19 | @property (nonatomic, copy) APHTTPMethod method;
20 | @property (nonatomic, strong) APRequest *request;
21 | @property (nonatomic, strong) APAuthentication *auth;
22 | @property (nonatomic, copy) APTransactionFailed transactionFailed;
23 |
24 | + (APTransaction *)transactionWithURL:(NSURL *)URL method:(APHTTPMethod)method;
25 | - (void)beginTransactionWithURL:(NSURL *)URL method:(APHTTPMethod)method;
26 | - (void)commitTransaction;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APStoreRating.h:
--------------------------------------------------------------------------------
1 | //
2 | // APStoreRating.h
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-12-04.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "APReview.h"
11 |
12 | @interface APStoreRating : NSObject
13 | - (id)initWithResponse:(NSDictionary *)response;
14 |
15 | @property (readonly) NSUInteger storeID;
16 | @property (readonly) NSString *country;
17 | @property (readonly) NSString *countryISO;
18 | @property (readonly) NSUInteger numberOfRatingsForAllVersions;
19 | @property (readonly) NSUInteger numberOfRatings;
20 | @property (readonly) NSUInteger numberOfStarsForAllVersions;
21 | @property (readonly) float averageRating;
22 | @property (readonly) NSUInteger numberOfPages;
23 | @property (readonly) NSUInteger numberOfReviews;
24 | @property (readonly) NSString *version;
25 | @property (readonly) NSArray *starsForAllVersions;
26 | @property (readonly) NSArray *stars;
27 | @property (readonly) NSArray *reviews;
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APProduct.h:
--------------------------------------------------------------------------------
1 | //
2 | // APProduct.h
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-11-29.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | enum {
12 | APProductTypeApp = 0,
13 | APProductTypeInApp,
14 | APProductTypeBook
15 | };
16 | typedef NSUInteger APProductType;
17 |
18 | @interface APProduct : NSObject
19 | - (id)initWithResponse:(NSDictionary *)response;
20 |
21 | @property (readonly) NSArray *inAppIDs;
22 | @property (readonly) APProductType type;
23 | @property (readonly) NSString *timestamp;
24 | @property (readonly) NSString *name;
25 | @property (readonly) NSUInteger productID;
26 | @property (readonly) NSURL *iconURL;
27 | @property (readonly) BOOL active;
28 | @property (readonly) BOOL hidden;
29 | @property (readonly) NSString *sku;
30 | @property (readonly) NSUInteger storeID;
31 | @property (readonly) NSString *storeName;
32 | @property (readonly) NSInteger refNumber;
33 | @property (readonly) NSArray *addOns;
34 |
35 | @end
36 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APRankTransaction.h:
--------------------------------------------------------------------------------
1 | //
2 | // APRankTransaction.h
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-11-30.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "APTransaction.h"
11 |
12 | @class APRankTransaction;
13 | @class APDateRange;
14 |
15 | extern NSString * const APRankGranularityDaily;
16 | extern NSString * const APRankGranularityHourly;
17 |
18 | typedef NSString * APRankGranularity;
19 | typedef void (^APRankTransactionCompleted)(APRankTransaction *transaction, NSDictionary *results);
20 |
21 | @interface APRankTransaction : APTransaction
22 | @property (nonatomic, strong) NSArray *products;
23 | @property (nonatomic, copy) APRankGranularity granularity;
24 | @property (nonatomic, strong) APDateRange *dateRange;
25 | @property (nonatomic, copy) NSArray *countries;
26 | @property (nonatomic, assign) NSInteger filter;
27 | @property (nonatomic, copy) APRankTransactionCompleted transactionCompleted;
28 |
29 | - (void)beginTransaction;
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APUserTransaction.h:
--------------------------------------------------------------------------------
1 | //
2 | // APUserTransaction.h
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-12-05.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import "APTransaction.h"
10 | #import "APUser.h"
11 | #import "APAccount.h"
12 | #import "APExternalAccount.h"
13 | #import "APProduct.h"
14 |
15 | @class APUserTransaction;
16 |
17 | extern NSString * const APUserTransactionTypeDefault;
18 | extern NSString * const APUserTransactionTypeProducts;
19 | extern NSString * const APUserTransactionTypeExternalAccounts;
20 |
21 | typedef NSString * APUserTransactionType;
22 |
23 | typedef void (^APUserTransactionCompleted)(APUserTransaction *transaction, NSArray *results);
24 |
25 | @interface APUserTransaction : APTransaction
26 |
27 | - (void)beginTransaction;
28 | - (void)beginTransactionWithType:(APUserTransactionType)type;
29 |
30 | @property (nonatomic, copy) APUserTransactionCompleted transactionCompleted;
31 | @property (nonatomic, copy) APUserTransactionType transactionType;
32 | @property (nonatomic, copy) NSString *email;
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APReviewTransaction.h:
--------------------------------------------------------------------------------
1 | //
2 | // APReviewTransaction.h
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-12-04.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import "APTransaction.h"
10 | #import "APStoreRating.h"
11 |
12 | @class APReviewTransaction;
13 |
14 | extern NSString * const APFetchReviewsCountryMajor;
15 | extern NSString * const APFetchReviewsCountryMinor;
16 | extern NSString * const APFetchReviewsCountryList;
17 |
18 | typedef NSString * APFetchReviewsCountry;
19 |
20 | typedef void (^APReviewTransactionCompleted)(APReviewTransaction *transaction, NSArray *storeRatings);
21 |
22 | @interface APReviewTransaction : APTransaction
23 |
24 | - (void)beginTransaction;
25 |
26 | @property (nonatomic, assign) NSUInteger productID;
27 | @property (nonatomic, copy) APFetchReviewsCountry countryFetchType;
28 | @property (nonatomic, strong) NSArray *countryList;
29 | @property (nonatomic, assign) NSUInteger pageNumber;
30 | @property (nonatomic, copy) NSString *language;
31 | @property (nonatomic, copy) APReviewTransactionCompleted transactionCompleted;
32 |
33 | @end
34 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APEvent.m:
--------------------------------------------------------------------------------
1 | //
2 | // APEvent.m
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-12-05.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import "APEvent.h"
10 |
11 | @interface APEvent ()
12 | @property (nonatomic, strong) NSDictionary *data;
13 | @end
14 |
15 | @implementation APEvent
16 |
17 | - (id)initWithResponse:(NSDictionary *)response
18 | {
19 | if ((self = [super init])) {
20 | self.data = response;
21 | }
22 | return self;
23 | }
24 |
25 | - (NSUInteger)eventID
26 | {
27 | return [[self.data objectForKey:@"id"] unsignedIntegerValue];
28 | }
29 |
30 | - (NSUInteger)accountID
31 | {
32 | return [[self.data objectForKey:@"account_id"] unsignedIntegerValue];
33 | }
34 |
35 | - (NSString *)caption
36 | {
37 | return [self.data objectForKey:@"caption"];
38 | }
39 |
40 | - (NSString *)date
41 | {
42 | return [self.data objectForKey:@"date"];
43 | }
44 |
45 | - (NSString *)origin
46 | {
47 | return [self.data objectForKey:@"origin"];
48 | }
49 |
50 | - (NSArray *)productIDs
51 | {
52 | return [self.data objectForKey:@"products"];
53 | }
54 |
55 | @end
56 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APRankData.m:
--------------------------------------------------------------------------------
1 | //
2 | // APRankData.m
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-11-29.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import "APRankData.h"
10 |
11 | @interface APRankData ()
12 | @property (nonatomic, strong) NSArray *data;
13 | @end
14 |
15 | @implementation APRankData
16 |
17 | - (id)initWithResponse:(NSArray *)response
18 | {
19 | if ((self = [super init])) {
20 | self.data = response;
21 | }
22 | return self;
23 | }
24 |
25 | - (NSUInteger)productID
26 | {
27 | return [[self.data objectAtIndex:0] unsignedIntegerValue];
28 | }
29 |
30 | - (NSUInteger)countryID
31 | {
32 | return [[self.data objectAtIndex:1] unsignedIntegerValue];
33 | }
34 |
35 | - (NSUInteger)categoryID
36 | {
37 | return [[self.data objectAtIndex:2] unsignedIntegerValue];
38 | }
39 |
40 | - (NSString *)subcategory
41 | {
42 | return [self.data objectAtIndex:3];
43 | }
44 |
45 | - (NSUInteger)rankPosition
46 | {
47 | return [[self.data objectAtIndex:4] unsignedIntegerValue];
48 | }
49 |
50 | - (NSInteger)delta
51 | {
52 | return [[self.data objectAtIndex:5] integerValue];
53 | }
54 |
55 | @end
56 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APAccount.m:
--------------------------------------------------------------------------------
1 | //
2 | // APAccount.m
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-12-05.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import "APAccount.h"
10 |
11 | NSString * const APAccountPlanTypeFree = @"free";
12 | NSString * const APAccountPlanTypePremium = @"premium";
13 | NSString * const APAccountPlanTypePublisher = @"publisher";
14 |
15 | @interface APAccount ()
16 | @property (nonatomic, strong) NSDictionary *data;
17 | @end
18 |
19 | @implementation APAccount
20 |
21 | - (id)initWithResponse:(NSDictionary *)response
22 | {
23 | if ((self = [super init])) {
24 | self.data = response;
25 | }
26 | return self;
27 | }
28 |
29 | - (NSUInteger)accountID
30 | {
31 | return [[self.data objectForKey:@"id"] unsignedIntegerValue];
32 | }
33 |
34 | - (NSString *)companyName
35 | {
36 | return [self.data objectForKey:@"company"];
37 | }
38 |
39 | - (NSString *)autoImport
40 | {
41 | return [self.data objectForKey:@"auto_import"];
42 | }
43 |
44 | - (NSString *)lastImport
45 | {
46 | return [self.data objectForKey:@"last_import"];
47 | }
48 |
49 | - (APAccountPlanType)plan
50 | {
51 | return [self.data objectForKey:@"plan"];
52 | }
53 |
54 | @end
55 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APEventTransaction.h:
--------------------------------------------------------------------------------
1 | //
2 | // APEventTransaction.h
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-12-05.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import "APTransaction.h"
10 | #import "APEvent.h"
11 |
12 | @class APEventTransaction;
13 |
14 | extern NSString * const APEventTransactionTypeGet;
15 | extern NSString * const APEventTransactionTypeCreate;
16 | extern NSString * const APEventTransactionTypeUpdate;
17 | extern NSString * const APEventTransactionTypeDelete;
18 |
19 | typedef NSString * APEventTransactionType;
20 |
21 | typedef void (^APEventTransactionCompleted)(APEventTransaction *transaction, NSArray *events);
22 |
23 | @interface APEventTransaction : APTransaction
24 |
25 | - (void)beginTransactionWithType:(APEventTransactionType)type;
26 |
27 | @property (nonatomic, copy) APEventTransactionCompleted transactionCompleted;
28 | @property (nonatomic, copy) APEventTransactionType transactionType;
29 |
30 | // Delete and Update
31 | @property (nonatomic, assign) NSUInteger eventID;
32 |
33 | // Create and Update
34 | @property (nonatomic, copy) NSString *caption;
35 | @property (nonatomic, strong) NSDate *date;
36 | @property (nonatomic, strong) NSArray *productIDs;
37 |
38 | @end
39 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APTransaction.m:
--------------------------------------------------------------------------------
1 | //
2 | // APTransaction.m
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-11-29.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import "APTransaction.h"
10 | #import "APRequest.h"
11 | #import "APConstants.h"
12 |
13 | @implementation APTransaction
14 |
15 | + (APTransaction *)transactionWithURL:(NSURL *)URL method:(APHTTPMethod)method
16 | {
17 | APTransaction *_transaction = [[APTransaction alloc] init];
18 | [_transaction beginTransactionWithURL:URL method:method];
19 | return _transaction;
20 | }
21 |
22 | - (void)beginTransactionWithURL:(NSURL *)URL method:(APHTTPMethod)method
23 | {
24 | self.URL = URL;
25 | self.method = method;
26 | self.request = [[APRequest alloc] initWithURL:URL method:method];
27 | }
28 |
29 | - (void)commitTransaction
30 | {
31 | self.request.auth = self.auth;
32 | self.connection = [self.request start];
33 | }
34 |
35 | - (void)setURL:(NSURL *)URL
36 | {
37 | _URL = URL;
38 | NSString *urlString = [_URL absoluteString];
39 | if (![urlString hasPrefix:kAPBaseURL]) {
40 | NSString *newURL = [NSString stringWithFormat:@"%@%@", kAPBaseURL, urlString];
41 | _URL = [NSURL URLWithString:newURL];
42 | }
43 | }
44 |
45 | @end
46 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APArchiveTransaction.h:
--------------------------------------------------------------------------------
1 | //
2 | // APArchiveTransaction.h
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-12-04.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import "APTransaction.h"
10 | #import "APArchive.h"
11 |
12 | @class APArchiveTransaction;
13 |
14 | extern NSString * const APArchiveTransactionTypeDefault;
15 | extern NSString * const APArchiveTransactionTypeLatest;
16 | extern NSString * const APArchiveTransactionTypeDate;
17 | extern NSString * const APArchiveTransactionTypeRaw;
18 |
19 | typedef NSString * APArchiveTransactionType;
20 |
21 | typedef void (^APArchiveTransactionCompleted)(APArchiveTransaction *transaction, NSArray *archives);
22 |
23 | @interface APArchiveTransaction : APTransaction
24 |
25 | - (void)beginTransaction;
26 | - (void)beginTransactionWithType:(APArchiveTransactionType)type;
27 |
28 | @property (nonatomic, copy) APArchiveTransactionCompleted transactionCompleted;
29 | @property (nonatomic, copy) APArchiveTransactionType transactionType;
30 |
31 | // All types but APArchiveTransactionTypeRaw
32 | @property (nonatomic, copy) APArchiveType archiveType;
33 |
34 | // APArchiveTransactionTypeDate
35 | @property (nonatomic, strong) NSDate *date;
36 |
37 | // APArchiveTransactionTypeRaw
38 | @property (nonatomic, assign) NSUInteger archiveID;
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APRegionSalesReport.m:
--------------------------------------------------------------------------------
1 | //
2 | // APRegionSalesReport.m
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-11-29.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import "APRegionSalesReport.h"
10 |
11 | @interface APRegionSalesReport ()
12 | @property (nonatomic, strong) NSDictionary *data;
13 | @end
14 |
15 | @implementation APRegionSalesReport
16 |
17 | - (id)initWithResponse:(NSDictionary *)response
18 | {
19 | if ((self = [super init])) {
20 | self.data = response;
21 | }
22 | return self;
23 | }
24 |
25 | - (NSUInteger)regionID
26 | {
27 | return [[self.data objectForKey:@"region_id"] unsignedIntegerValue];
28 | }
29 |
30 | - (NSString *)regionName
31 | {
32 | return [self.data objectForKey:@"region_name"];
33 | }
34 |
35 | - (NSString *)currency
36 | {
37 | return [self.data objectForKey:@"currency"];
38 | }
39 |
40 | - (NSUInteger)returns
41 | {
42 | return [[self.data objectForKey:@"returns"] unsignedIntegerValue];
43 | }
44 |
45 | - (NSUInteger)units
46 | {
47 | return [[self.data objectForKey:@"units"] unsignedIntegerValue];
48 | }
49 |
50 | - (NSString *)convertedRevenue
51 | {
52 | return [self.data objectForKey:@"converted_revenue"];
53 | }
54 |
55 | - (NSString *)baseRevenue
56 | {
57 | return [self.data objectForKey:@"base_revenue"];
58 | }
59 |
60 | @end
61 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APSalesReport.h:
--------------------------------------------------------------------------------
1 | //
2 | // APSalesReport.h
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-11-29.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class APProduct;
12 |
13 | extern NSString * const APSalesTypeProducts;
14 | extern NSString * const APSalesTypeDates;
15 | extern NSString * const APSalesTypeCountries;
16 | extern NSString * const APSalesTypeProductsAndDates;
17 | extern NSString * const APSalesTypeDatesAndProducts;
18 | extern NSString * const APSalesTypeProductsAndCountries;
19 | extern NSString * const APSalesTypeCountriesAndProducts;
20 |
21 | extern NSString * const APSalesDataSourceDaily;
22 | extern NSString * const APSalesDataSourceWeekly;
23 | extern NSString * const APSalesDataSourceMonthly;
24 |
25 | typedef NSString * APSalesType;
26 | typedef NSString * APSalesDataSource;
27 |
28 | @interface APSalesReport : NSObject
29 |
30 | - (id)initWithResponse:(NSDictionary *)response;
31 |
32 | @property (readonly) NSString *country;
33 | @property (readonly) NSString *iso;
34 | @property (readonly) NSUInteger downloads;
35 | @property (readonly) NSInteger netDownloads;
36 | @property (readonly) NSUInteger updates;
37 | @property (readonly) float totalRevenue;
38 | @property (readonly) NSUInteger returns;
39 | @property (readonly) NSUInteger giftRedemptions;
40 | @property (readonly) NSUInteger promos;
41 | @property (readonly) APProduct *product;
42 |
43 | @end
44 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APiAdReport.m:
--------------------------------------------------------------------------------
1 | //
2 | // APiAdReport.m
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-12-04.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import "APiAdReport.h"
10 |
11 | @interface APiAdReport ()
12 | @property (nonatomic, strong) NSDictionary *data;
13 | @end
14 |
15 | @implementation APiAdReport
16 |
17 | - (id)initWithResponse:(NSDictionary *)response
18 | {
19 | if ((self = [super init])) {
20 | self.data = response;
21 | }
22 | return self;
23 | }
24 |
25 | - (NSString *)country
26 | {
27 | return [self.data objectForKey:@"country"];
28 | }
29 |
30 | - (NSString *)countryISO
31 | {
32 | return [self.data objectForKey:@"country_iso"];
33 | }
34 |
35 | - (NSString *)timestamp
36 | {
37 | return [self.data objectForKey:@"timestamp"];
38 | }
39 |
40 | - (float)revenue
41 | {
42 | return [[self.data objectForKey:@"revenue"] floatValue];
43 | }
44 |
45 | - (NSUInteger)requests
46 | {
47 | return [[self.data objectForKey:@"requests"] unsignedIntegerValue];
48 | }
49 |
50 | - (NSUInteger)impressions
51 | {
52 | return [[self.data objectForKey:@"impressions"] unsignedIntegerValue];
53 | }
54 |
55 | - (float)ECPM
56 | {
57 | return [[self.data objectForKey:@"ecpm"] floatValue];
58 | }
59 |
60 | - (float)fillRate
61 | {
62 | return [[self.data objectForKey:@"fillrate"] floatValue];
63 | }
64 |
65 | - (float)clickThroughRate
66 | {
67 | return [[self.data objectForKey:@"ctr"] floatValue];
68 | }
69 |
70 | @end
71 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APArchive.m:
--------------------------------------------------------------------------------
1 | //
2 | // APArchive.m
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-12-04.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import "APArchive.h"
10 |
11 | NSString * const APArchiveTypeDaily = @"daily";
12 | NSString * const APArchiveTypeWeekly = @"weekly";
13 | NSString * const APArchiveTypeFinancial = @"financial";
14 | NSString * const APArchiveTypePayment = @"payment";
15 | NSString * const APArchiveTypeAll = @"all";
16 |
17 | @interface APArchive ()
18 | @property (nonatomic, strong) NSDictionary *data;
19 | @end
20 |
21 | @implementation APArchive
22 |
23 | - (id)initWithResponse:(NSDictionary *)response
24 | {
25 | if ((self = [super init])) {
26 | self.data = response;
27 | }
28 | return self;
29 | }
30 |
31 | - (NSUInteger)archiveID
32 | {
33 | return [[self.data objectForKey:@"id"] unsignedIntegerValue];
34 | }
35 |
36 | - (APArchiveType)type
37 | {
38 | return [self.data objectForKey:@"type"];
39 | }
40 |
41 | - (NSUInteger)itcID
42 | {
43 | return [[self.data objectForKey:@"itc_id"] unsignedIntegerValue];
44 | }
45 |
46 | - (NSString *)reportTimestamp
47 | {
48 | return [self.data objectForKey:@"report_timestamp"];
49 | }
50 |
51 | - (NSString *)importTimestamp
52 | {
53 | return [self.data objectForKey:@"import_timestamp"];
54 | }
55 |
56 | - (NSString *)importMethod
57 | {
58 | return [self.data objectForKey:@"import_method"];
59 | }
60 |
61 | - (NSString *)region
62 | {
63 | return [self.data objectForKey:@"region"];
64 | }
65 |
66 | @end
67 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APRequest.h:
--------------------------------------------------------------------------------
1 | //
2 | // APRequest.h
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-11-29.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "APAuthentication.h"
11 |
12 | extern NSString * const APHTTPMethodGet;
13 | extern NSString * const APHTTPMethodPost;
14 | extern NSString * const APHTTPMethodPut;
15 | extern NSString * const APHTTPMethodDelete;
16 |
17 | typedef NSString * APHTTPMethod;
18 |
19 | @class APRequest;
20 |
21 | @protocol APRequestDelegate
22 | @optional
23 | - (void)request:(APRequest *)request didCompleteWithResults:(NSDictionary *)results;
24 | - (void)request:(APRequest *)request didFailWithError:(NSError *)error;
25 | @end
26 |
27 | @interface APRequest : NSObject {
28 | struct {
29 | BOOL respondsToComplete;
30 | BOOL respondsToFail;
31 | } _flags;
32 | }
33 |
34 | @property (nonatomic, strong) APAuthentication *auth;
35 | @property (nonatomic, strong) NSURL *URL;
36 | @property (nonatomic, copy) APHTTPMethod method;
37 | @property (nonatomic, strong) NSDictionary *arguments;
38 | @property (nonatomic, strong) NSURLConnection *connection;
39 | @property (nonatomic, weak) id delegate;
40 | @property (nonatomic, strong) NSHTTPURLResponse *response;
41 |
42 | - (id)initWithURL:(NSURL *)URL method:(APHTTPMethod)method;
43 | - (id)initWithURL:(NSURL *)URL method:(APHTTPMethod)method delegate:(id)delegate;
44 | - (NSURLConnection *)start;
45 | - (void)cancel;
46 |
47 | @end
--------------------------------------------------------------------------------
/AppFiguresAPI/APExternalAccountTransaction.h:
--------------------------------------------------------------------------------
1 | //
2 | // APExternalAccountTransaction.h
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-12-05.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import "APTransaction.h"
10 | #import "APExternalAccount.h"
11 | #import "APAuthentication.h"
12 |
13 | @class APExternalAccountTransaction;
14 |
15 | extern NSString * const APExternalAccountTransactionTypeAll;
16 | extern NSString * const APExternalAccountTransactionTypeLookup;
17 | extern NSString * const APExternalAccountTransactionTypeCreate;
18 | extern NSString * const APExternalAccountTransactionTypeUpdate;
19 | extern NSString * const APExternalAccountTransactionTypeDelete;
20 |
21 | typedef NSString * APExternalAccountTransactionType;
22 | typedef void (^APExternalAccountTransactionCompleted)(APExternalAccountTransaction *transaction, NSArray *accounts);
23 |
24 | @interface APExternalAccountTransaction : APTransaction
25 |
26 | - (void)beginTransaction;
27 | - (void)beginTransactionWithType:(APExternalAccountTransactionType)type;
28 |
29 | @property (nonatomic, copy) APExternalAccountTransactionCompleted transactionCompleted;
30 | @property (nonatomic, copy) APExternalAccountTransactionType transactionType;
31 |
32 | // Lookup & Update
33 | @property (nonatomic, assign) NSUInteger accountID;
34 |
35 | // Create & Update
36 | @property (nonatomic, copy) NSString *nickname;
37 | @property (nonatomic, strong) APAuthentication *auth;
38 | @property (nonatomic, assign) BOOL autoImport;
39 |
40 | // Just Create
41 | @property (nonatomic, copy) APExternalAccountType type;
42 |
43 | @end
44 |
--------------------------------------------------------------------------------
/AppFiguresAPI/AppFiguresAPI.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppFiguresAPI.h
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-11-29.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "APConstants.h"
11 | #import "APDateRange.h"
12 | #import "APSalesReport.h"
13 | #import "APAuthentication.h"
14 |
15 | #import "APSalesTransaction.h"
16 | #import "APRankTransaction.h"
17 | #import "APReviewTransaction.h"
18 | #import "APExternalAccountTransaction.h"
19 | #import "APiAdTransaction.h"
20 | #import "APArchiveTransaction.h"
21 | #import "APEventTransaction.h"
22 | #import "APUserTransaction.h"
23 |
24 | typedef void (^APSalesForTypeCompleted)(NSDictionary *results);
25 |
26 | @interface AppFiguresAPI : NSObject
27 |
28 | @property (nonatomic, strong) APAuthentication *auth;
29 |
30 | + (AppFiguresAPI *)engine;
31 | + (AppFiguresAPI *)engineWithUsername:(NSString *)username password:(NSString *)password;
32 | - (id)initWithUsername:(NSString *)username password:(NSString *)password;
33 |
34 | #pragma mark - Sales
35 |
36 | - (APSalesTransaction *)beginSalesTransaction;
37 |
38 | #pragma mark - Ranks
39 |
40 | - (APRankTransaction *)beginRankTransaction;
41 |
42 | #pragma mark - Reviews
43 |
44 | - (APReviewTransaction *)beginReviewTransaction;
45 |
46 | #pragma mark - iAds
47 |
48 | - (APiAdTransaction *)beginiAdTransaction;
49 |
50 | #pragma mark - Archive
51 |
52 | - (APArchiveTransaction *)beginArchiveTransaction;
53 |
54 | #pragma mark - Events
55 |
56 | - (APEventTransaction *)beginEventTransaction;
57 |
58 | #pragma mark - Users
59 |
60 | - (APUserTransaction *)beginUserTransaction;
61 |
62 | @end
63 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APExternalAccount.m:
--------------------------------------------------------------------------------
1 | //
2 | // APExternalAccount.m
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-12-05.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import "APExternalAccount.h"
10 |
11 | NSString * const APExternalAccountTypeITC = @"itunes_connect";
12 | NSString * const APExternalAccountTypeAndroidMarket = @"android_market";
13 | NSString * const APExternalAccountTypeGoogleCheckout = @"google_checkout";
14 |
15 | @interface APExternalAccount ()
16 | @property (nonatomic, strong) NSDictionary *data;
17 | @end
18 |
19 | @implementation APExternalAccount
20 |
21 | - (id)initWithResponse:(NSDictionary *)response
22 | {
23 | if ((self = [super init])) {
24 | self.data = response;
25 | }
26 | return self;
27 | }
28 |
29 | - (NSUInteger)appFiguresID
30 | {
31 | return [[self.data objectForKey:@"id"] unsignedIntegerValue];
32 | }
33 |
34 | - (NSUInteger)accountID
35 | {
36 | return [[self.data objectForKey:@"account_id"] unsignedIntegerValue];
37 | }
38 |
39 | - (NSString *)nickname
40 | {
41 | return [self.data objectForKey:@"nickname"];
42 | }
43 |
44 | - (NSString *)username
45 | {
46 | return [self.data objectForKey:@"username"];
47 | }
48 |
49 | - (BOOL)autoImports
50 | {
51 | return [[self.data objectForKey:@"auto_imports"] boolValue];
52 | }
53 |
54 | - (BOOL)hasiAds
55 | {
56 | return [[self.data objectForKey:@"has_iads"] boolValue];
57 | }
58 |
59 | - (NSUInteger)typeID
60 | {
61 | return [[self.data objectForKey:@"type_id"] unsignedIntegerValue];
62 | }
63 |
64 | - (APExternalAccountType)type
65 | {
66 | return [self.data objectForKey:@"type"];
67 | }
68 |
69 | @end
70 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APReview.m:
--------------------------------------------------------------------------------
1 | //
2 | // APReview.m
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-12-04.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import "APReview.h"
10 |
11 | @interface APReview ()
12 | @property (nonatomic, strong) NSDictionary *data;
13 | @end
14 |
15 | @implementation APReview
16 |
17 | - (id)initWithResponse:(NSDictionary *)response
18 | {
19 | if ((self = [super init])) {
20 | self.data = response;
21 | }
22 | return self;
23 | }
24 |
25 | - (NSUInteger)reviewID
26 | {
27 | return [[self.data objectForKey:@"id"] unsignedIntegerValue];
28 | }
29 |
30 | - (NSString *)title
31 | {
32 | return [self.data objectForKey:@"title"];
33 | }
34 |
35 | - (NSString *)review
36 | {
37 | return [self.data objectForKey:@"review"];
38 | }
39 |
40 | - (NSString *)originalTitle
41 | {
42 | return [self.data objectForKey:@"original_title"];
43 | }
44 |
45 | - (NSString *)originalReview
46 | {
47 | return [self.data objectForKey:@"original_review"];
48 | }
49 |
50 | - (NSString *)author
51 | {
52 | return [self.data objectForKey:@"author"];
53 | }
54 |
55 | - (NSString *)version
56 | {
57 | return [self.data objectForKey:@"version"];
58 | }
59 |
60 | - (NSString *)date
61 | {
62 | return [self.data objectForKey:@"date"];
63 | }
64 |
65 | - (NSUInteger)stars
66 | {
67 | return [[self.data objectForKey:@"stars"] unsignedIntegerValue];
68 | }
69 |
70 | - (NSString *)type
71 | {
72 | return [self.data objectForKey:@"type"];
73 | }
74 |
75 | - (NSString *)reviewType
76 | {
77 | return [self.data objectForKey:@"review_type"];
78 | }
79 |
80 | - (NSString *)countryISO
81 | {
82 | return [self.data objectForKey:@"iso"];
83 | }
84 |
85 | - (NSString *)country
86 | {
87 | return [self.data objectForKey:@"country"];
88 | }
89 |
90 | @end
91 |
--------------------------------------------------------------------------------
/AppFiguresAPI.xcodeproj/xcuserdata/kylehickinson.xcuserdatad/xcschemes/AppFiguresAPI.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
4 |
7 |
8 |
14 |
20 |
21 |
22 |
23 |
24 |
29 |
30 |
31 |
32 |
40 |
41 |
42 |
43 |
49 |
50 |
52 |
53 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APProduct.m:
--------------------------------------------------------------------------------
1 | //
2 | // APProduct.m
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-11-29.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import "APProduct.h"
10 |
11 | @interface APProduct ()
12 | @property (nonatomic, strong) NSDictionary *data;
13 | @end
14 |
15 | @implementation APProduct
16 |
17 | - (id)initWithResponse:(NSDictionary *)response
18 | {
19 | if ((self = [super init])) {
20 | self.data = response;
21 | }
22 | return self;
23 | }
24 |
25 | - (NSArray *)inAppIDs
26 | {
27 | return [self.data objectForKey:@"in_apps"];
28 | }
29 |
30 | - (APProductType)type
31 | {
32 | static APProductType _type = -1;
33 | if (_type == -1) {
34 | NSString *_str = [self.data objectForKey:@"product_type"];
35 | if ([_str isEqualToString:@"app"]) {
36 | _type = APProductTypeApp;
37 | } else if ([_str isEqualToString:@"in_app"]) {
38 | _type = APProductTypeInApp;
39 | } else if ([_str isEqualToString:@"book"]) {
40 | _type = APProductTypeBook;
41 | }
42 | }
43 | return _type;
44 | }
45 |
46 | - (NSString *)timestamp
47 | {
48 | return [self.data objectForKey:@"added_timestamp"];
49 | }
50 |
51 | - (NSString *)name
52 | {
53 | return [self.data objectForKey:@"name"];
54 | }
55 |
56 | - (NSUInteger)productID
57 | {
58 | return [[self.data objectForKey:@"id"] unsignedIntegerValue];
59 | }
60 |
61 | - (NSURL *)iconURL
62 | {
63 | return [NSURL URLWithString:[self.data objectForKey:@"icon"]];
64 | }
65 |
66 | - (BOOL)active
67 | {
68 | return [[self.data objectForKey:@"active"] boolValue];
69 | }
70 |
71 | - (BOOL)hidden
72 | {
73 | return [[self.data objectForKey:@"hidden"] boolValue];
74 | }
75 |
76 | - (NSString *)sku
77 | {
78 | return [self.data objectForKey:@"sku"];
79 | }
80 |
81 | - (NSUInteger)storeID
82 | {
83 | return [[self.data objectForKey:@"store_id"] unsignedIntegerValue];
84 | }
85 |
86 | - (NSString *)storeName
87 | {
88 | return [self.data objectForKey:@"store_name"];
89 | }
90 |
91 | - (NSInteger)refNumber
92 | {
93 | return [[self.data objectForKey:@"ref_no"] integerValue];
94 | }
95 |
96 | - (NSArray *)addOns
97 | {
98 | return [self.data objectForKey:@"addons"];
99 | }
100 |
101 | @end
102 |
--------------------------------------------------------------------------------
/AppFiguresAPI/AppFiguresAPI.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppFiguresAPI.m
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-11-29.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import "AppFiguresAPI.h"
10 |
11 | @implementation AppFiguresAPI
12 |
13 | + (AppFiguresAPI *)engine
14 | {
15 | return [self engineWithUsername:nil password:nil];
16 | }
17 |
18 | + (AppFiguresAPI *)engineWithUsername:(NSString *)username password:(NSString *)password
19 | {
20 | static AppFiguresAPI *_engine = nil;
21 | if (!_engine) {
22 | static dispatch_once_t onceToken;
23 | dispatch_once(&onceToken, ^{
24 | _engine = [[AppFiguresAPI alloc] initWithUsername:username password:password];
25 | });
26 | }
27 | return _engine;
28 | }
29 |
30 | - (id)initWithUsername:(NSString *)username password:(NSString *)password
31 | {
32 | if ((self = [super init])) {
33 | self.auth = [[APAuthentication alloc] initWithUsername:username password:password];
34 | }
35 | return self;
36 | }
37 |
38 | - (APSalesTransaction *)beginSalesTransaction
39 | {
40 | APSalesTransaction *sales = [[APSalesTransaction alloc] init];
41 | sales.auth = self.auth;
42 | return sales;
43 | }
44 |
45 | - (APRankTransaction *)beginRankTransaction
46 | {
47 | APRankTransaction *ranks = [[APRankTransaction alloc] init];
48 | ranks.auth = self.auth;
49 | return ranks;
50 | }
51 |
52 | - (APReviewTransaction *)beginReviewTransaction
53 | {
54 | APReviewTransaction *reviews = [[APReviewTransaction alloc] init];
55 | reviews.auth = self.auth;
56 | return reviews;
57 | }
58 |
59 | - (APiAdTransaction *)beginiAdTransaction
60 | {
61 | APiAdTransaction *iads = [[APiAdTransaction alloc] init];
62 | iads.auth = self.auth;
63 | return iads;
64 | }
65 |
66 | - (APArchiveTransaction *)beginArchiveTransaction
67 | {
68 | APArchiveTransaction *archive = [[APArchiveTransaction alloc] init];
69 | archive.auth = self.auth;
70 | return archive;
71 | }
72 |
73 | - (APEventTransaction *)beginEventTransaction
74 | {
75 | APEventTransaction *events = [[APEventTransaction alloc] init];
76 | events.auth = self.auth;
77 | return events;
78 | }
79 |
80 | - (APUserTransaction *)beginUserTransaction
81 | {
82 | APUserTransaction *users = [[APUserTransaction alloc] init];
83 | users.auth = self.auth;
84 | return users;
85 | }
86 |
87 | @end
88 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APUserTransaction.m:
--------------------------------------------------------------------------------
1 | //
2 | // APUserTransaction.m
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-12-05.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import "APUserTransaction.h"
10 |
11 | NSString * const APUserTransactionTypeDefault = @"";
12 | NSString * const APUserTransactionTypeProducts = @"products";
13 | NSString * const APUserTransactionTypeExternalAccounts = @"external_accounts";
14 |
15 | @implementation APUserTransaction
16 |
17 | - (void)beginTransaction
18 | {
19 | [self beginTransactionWithType:APUserTransactionTypeDefault];
20 | }
21 |
22 | - (void)beginTransactionWithType:(APUserTransactionType)type
23 | {
24 | [super beginTransactionWithURL:nil method:APHTTPMethodGet];
25 | self.transactionType = type;
26 | self.request.delegate = self;
27 | }
28 |
29 | - (void)commitTransaction
30 | {
31 | //
32 | // GET /users/{email}
33 | // GET /users/{email}/products
34 | // GET /users/{email}/external_accounts
35 | //
36 |
37 | NSMutableString *_url = [[NSMutableString alloc] initWithString:@"users/"];
38 | [_url appendFormat:@"%@/", self.email];
39 | [_url appendFormat:@"%@", self.transactionType];
40 |
41 | self.URL = [NSURL URLWithString:_url];
42 |
43 | [self commitTransaction];
44 | }
45 |
46 | - (void)request:(APRequest *)request didCompleteWithResults:(NSDictionary *)results
47 | {
48 | NSMutableArray *_results = [[NSMutableArray alloc] init];
49 | if ([self.transactionType isEqualToString:APUserTransactionTypeDefault]) {
50 | [_results addObject:[[APUser alloc] initWithResponse:results]];
51 | } else if ([self.transactionType isEqualToString:APUserTransactionTypeExternalAccounts]) {
52 | for (NSString *key in results) {
53 | [_results addObject:[[APExternalAccount alloc] initWithResponse:[results objectForKey:key]]];
54 | }
55 | } else {
56 | for (NSString *key in results) {
57 | [_results addObject:[[APProduct alloc] initWithResponse:[results objectForKey:key]]];
58 | }
59 | }
60 |
61 | if (self.transactionCompleted) {
62 | self.transactionCompleted(self, _results);
63 | }
64 | }
65 |
66 | - (void)request:(APRequest *)request didFailWithError:(NSError *)error
67 | {
68 | if (self.transactionFailed) {
69 | self.transactionFailed(self, error);
70 | }
71 | }
72 |
73 | @end
74 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APUser.m:
--------------------------------------------------------------------------------
1 | //
2 | // APUser.m
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-12-05.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import "APUser.h"
10 |
11 | @interface APUser ()
12 | @property (nonatomic, strong) NSDictionary *data;
13 | @property (nonatomic, strong) APAccount *cachedAccount;
14 | @property (nonatomic, strong) NSMutableArray *cachedProducts;
15 | @end
16 |
17 | @implementation APUser
18 |
19 | - (id)initWithResponse:(NSDictionary *)response
20 | {
21 | if ((self = [super init])) {
22 | self.data = response;
23 | }
24 | return self;
25 | }
26 |
27 | - (NSString *)currency
28 | {
29 | return [self.data objectForKey:@"currency"];
30 | }
31 |
32 | - (NSString *)region
33 | {
34 | return [self.data objectForKey:@"region"];
35 | }
36 |
37 | - (BOOL)isOwner
38 | {
39 | return [[self.data objectForKey:@"is_owner"] boolValue];
40 | }
41 |
42 | - (float)shareOfProfit
43 | {
44 | return [[self.data objectForKey:@"share_of_profit"] floatValue];
45 | }
46 |
47 | - (NSString *)lastLogin
48 | {
49 | return [self.data objectForKey:@"last_login"];
50 | }
51 |
52 | - (NSString *)timezone
53 | {
54 | return [self.data objectForKey:@"timezone"];
55 | }
56 |
57 | - (APAccount *)account
58 | {
59 | if (!self.cachedAccount) {
60 | self.cachedAccount = [[APAccount alloc] initWithResponse:[self.data objectForKey:@"account"]];
61 | }
62 | return self.cachedAccount;
63 | }
64 |
65 | - (NSUInteger)userID
66 | {
67 | return [[self.data objectForKey:@"id"] unsignedIntegerValue];
68 | }
69 |
70 | - (NSString *)role
71 | {
72 | return [self.data objectForKey:@"role"];
73 | }
74 |
75 | - (NSString *)name
76 | {
77 | return [self.data objectForKey:@"name"];
78 | }
79 |
80 | - (NSString *)email
81 | {
82 | return [self.data objectForKey:@"email"];
83 | }
84 |
85 | - (NSArray *)products
86 | {
87 | if (!self.cachedProducts) {
88 | self.cachedProducts = [[NSMutableArray alloc] init];
89 | for (NSDictionary *product in [self.data objectForKey:@"products"]) {
90 | [self.cachedProducts addObject:[[APProduct alloc] initWithResponse:product]];
91 | }
92 | }
93 | return self.cachedProducts;
94 | }
95 |
96 | - (NSString *)dateFormat
97 | {
98 | return [self.data objectForKey:@"date_format"];
99 | }
100 |
101 | @end
102 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APSalesReport.m:
--------------------------------------------------------------------------------
1 | //
2 | // APSalesReport.m
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-11-29.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import "APSalesReport.h"
10 | #import "APProduct.h"
11 |
12 | NSString * const APSalesTypeProducts = @"products";
13 | NSString * const APSalesTypeDates = @"dates";
14 | NSString * const APSalesTypeCountries = @"countries";
15 | NSString * const APSalesTypeProductsAndDates = @"products+dates";
16 | NSString * const APSalesTypeDatesAndProducts = @"dates+products";
17 | NSString * const APSalesTypeProductsAndCountries = @"products+countries";
18 | NSString * const APSalesTypeCountriesAndProducts = @"countries+products";
19 |
20 | NSString * const APSalesDataSourceDaily = @"daily";
21 | NSString * const APSalesDataSourceWeekly = @"weekly";
22 | NSString * const APSalesDataSourceMonthly = @"monthly";
23 |
24 | @interface APSalesReport ()
25 | @property (nonatomic, strong) NSDictionary *data;
26 | @end
27 |
28 | @implementation APSalesReport
29 |
30 | - (id)initWithResponse:(NSDictionary *)response
31 | {
32 | if ((self = [super init])) {
33 | self.data = response;
34 | }
35 | return self;
36 | }
37 |
38 | - (NSString *)country
39 | {
40 | return [self.data objectForKey:@"country"];
41 | }
42 |
43 | - (NSString *)iso
44 | {
45 | return [self.data objectForKey:@"iso"];
46 | }
47 |
48 | - (APProduct *)product
49 | {
50 | static APProduct *_product = nil;
51 | if (!_product) {
52 | _product = [[APProduct alloc] initWithResponse:[self.data objectForKey:@"product"]];
53 | }
54 | return _product;
55 | }
56 |
57 | - (NSUInteger)downloads
58 | {
59 | return [[self.data objectForKey:@"downloads"] unsignedIntegerValue];
60 | }
61 |
62 | - (NSInteger)netDownloads
63 | {
64 | return [[self.data objectForKey:@"net_downloads"] integerValue];
65 | }
66 |
67 | - (NSUInteger)updates
68 | {
69 | return [[self.data objectForKey:@"updates"] unsignedIntegerValue];
70 | }
71 |
72 | - (float)totalRevenue
73 | {
74 | return [[self.data objectForKey:@"total_revenue"] floatValue];
75 | }
76 |
77 | - (NSUInteger)returns
78 | {
79 | return [[self.data objectForKey:@"returns"] unsignedIntegerValue];
80 | }
81 |
82 | - (NSUInteger)giftRedemptions
83 | {
84 | return [[self.data objectForKey:@"gift_redemptions"] unsignedIntegerValue];
85 | }
86 |
87 | - (NSUInteger)promos
88 | {
89 | return [[self.data objectForKey:@"promos"] unsignedIntegerValue];
90 | }
91 |
92 | @end
93 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APReviewTransaction.m:
--------------------------------------------------------------------------------
1 | //
2 | // APReviewTransaction.m
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-12-04.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import "APReviewTransaction.h"
10 |
11 | NSString * const APFetchReviewsCountryMajor = @"major";
12 | NSString * const APFetchReviewsCountryMinor = @"minor";
13 | NSString * const APFetchReviewsCountryList = @"use_list";
14 |
15 | @implementation APReviewTransaction
16 |
17 | - (id)init
18 | {
19 | if ((self = [super init])) {
20 | [self beginTransaction];
21 | }
22 | return self;
23 | }
24 |
25 | - (void)beginTransaction
26 | {
27 | [super beginTransactionWithURL:nil method:APHTTPMethodGet];
28 | self.request.delegate = self;
29 | }
30 |
31 | - (void)commitTransaction
32 | {
33 | //
34 | // GET /reviews/{productId}/{countries}/{page}/?language={language}
35 | //
36 |
37 | NSMutableString *_url = [[NSMutableString alloc] initWithString:@"reviews/"];
38 | [_url appendFormat:@"%d/", self.productID];
39 |
40 | if ([self.countryFetchType isEqualToString:APFetchReviewsCountryList]) {
41 | for (NSInteger i = 0; i < [self.countryList count]; i++) {
42 | [_url appendFormat:@"%@", [self.countryList objectAtIndex:i]];
43 | if (i != [self.countryList count]-1) {
44 | [_url appendString:@";"];
45 | }
46 | }
47 | } else {
48 | [_url appendFormat:@"%@/", self.countryFetchType];
49 | }
50 |
51 | [_url appendFormat:@"%d/", self.pageNumber];
52 |
53 | if ([self.language length] != 0) {
54 | // Probably should cross-reference supported languages?
55 | [_url appendFormat:@"?language=%@", self.language];
56 | }
57 |
58 | self.URL = [NSURL URLWithString:_url];
59 |
60 | [super commitTransaction];
61 | }
62 |
63 | - (void)request:(APRequest *)request didCompleteWithResults:(NSDictionary *)results
64 | {
65 | NSMutableArray *_results = [[NSMutableArray alloc] init];
66 | for (NSString *countryKey in results) {
67 | [_results addObject:[[APStoreRating alloc] initWithResponse:[results objectForKey:countryKey]]];
68 | }
69 |
70 | if (self.transactionCompleted) {
71 | self.transactionCompleted(self, _results);
72 | }
73 | }
74 |
75 | - (void)request:(APRequest *)request didFailWithError:(NSError *)error
76 | {
77 | if (self.transactionFailed) {
78 | self.transactionFailed(self, error);
79 | }
80 | }
81 |
82 | @end
83 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APStoreRating.m:
--------------------------------------------------------------------------------
1 | //
2 | // APStoreRating.m
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-12-04.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import "APStoreRating.h"
10 |
11 | @interface APStoreRating ()
12 | @property (nonatomic, strong) NSDictionary *data;
13 | @property (nonatomic, strong) NSMutableArray *cachedReviews;
14 | @end
15 |
16 | @implementation APStoreRating
17 |
18 | - (id)initWithResponse:(NSDictionary *)response
19 | {
20 | if ((self = [super init])) {
21 | self.data = response;
22 | }
23 | return self;
24 | }
25 |
26 | - (NSUInteger)storeID
27 | {
28 | return [[self.data objectForKey:@"store_id"] unsignedIntegerValue];
29 | }
30 |
31 | - (NSString *)country
32 | {
33 | return [self.data objectForKey:@"country"];
34 | }
35 |
36 | - (NSString *)countryISO
37 | {
38 | return [self.data objectForKey:@"iso_country"];
39 | }
40 |
41 | - (NSUInteger)numberOfRatingsForAllVersions
42 | {
43 | return [[self.data objectForKey:@"all_ratings"] unsignedIntegerValue];
44 | }
45 |
46 | - (NSUInteger)numberOfRatings
47 | {
48 | return [[self.data objectForKey:@"ratings"] unsignedIntegerValue];
49 | }
50 |
51 | - (NSUInteger)numberOfStarsForAllVersions
52 | {
53 | return [[self.data objectForKey:@"all_stars"] unsignedIntegerValue];
54 | }
55 |
56 | - (float)averageRating
57 | {
58 | return [[self.data objectForKey:@"stars"] floatValue];
59 | }
60 |
61 | - (NSUInteger)numberOfPages
62 | {
63 | return [[self.data objectForKey:@"num_pages"] unsignedIntegerValue];
64 | }
65 |
66 | - (NSUInteger)numberOfReviews
67 | {
68 | return [[self.data objectForKey:@"num_reviews"] unsignedIntegerValue];
69 | }
70 |
71 | - (NSString *)version
72 | {
73 | return [self.data objectForKey:@"version"];
74 | }
75 |
76 | - (NSArray *)starsForAllVersions
77 | {
78 | return [((NSString *)[self.data objectForKey:@"all_star_breakdown"]) componentsSeparatedByString:@","];
79 | }
80 |
81 | - (NSArray *)stars
82 | {
83 | return [((NSString *)[self.data objectForKey:@"star_breakdown"]) componentsSeparatedByString:@","];
84 | }
85 |
86 | - (NSArray *)reviews
87 | {
88 | if (!self.cachedReviews) {
89 | self.cachedReviews = [[NSMutableArray alloc] init];
90 |
91 | NSArray *_reviews = [self.data objectForKey:@"reviews"];
92 | for (NSDictionary *aReview in _reviews) {
93 | [self.cachedReviews addObject:[[APReview alloc] initWithResponse:aReview]];
94 | }
95 | }
96 | return self.cachedReviews;
97 | }
98 |
99 | @end
100 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APiAdTransaction.m:
--------------------------------------------------------------------------------
1 | //
2 | // APiAdTransaction.m
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-12-04.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import "APiAdTransaction.h"
10 |
11 | @implementation APiAdTransaction
12 |
13 | - (id)init
14 | {
15 | if ((self = [super init])) {
16 | [self beginTransaction];
17 | }
18 | return self;
19 | }
20 |
21 | - (void)beginTransaction
22 | {
23 | [super beginTransactionWithURL:nil method:APHTTPMethodGet];
24 | self.request.delegate = self;
25 | }
26 |
27 | - (void)commitTransaction
28 | {
29 | //
30 | // GET /iads/{type}/{startDate}/{endDate}?products={productIds}
31 | //
32 |
33 | NSMutableString *_url = [[NSMutableString alloc] initWithString:@"iads/"];
34 | [_url appendFormat:@"%@/", self.type];
35 |
36 | if (self.dateRange) {
37 | NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
38 | [formatter setDateFormat:@"yyyy-MM-dd"];
39 | [_url appendFormat:@"%@/%@/", [formatter stringFromDate:self.dateRange.from], [formatter stringFromDate:self.dateRange.to]];
40 | } else {
41 | // We have a problem. For now just add today.
42 | NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
43 | [formatter setDateFormat:@"yyyy-MM-dd"];
44 | NSString *todaysDate = [formatter stringFromDate:[NSDate date]];
45 | [_url appendFormat:@"%@/%@/", todaysDate, todaysDate];
46 | }
47 |
48 | if ([self.products count] > 0) {
49 | [_url appendString:@"?products="];
50 | for (NSInteger i = 0; i < [self.products count]; i++) {
51 | [_url appendFormat:@"%d", [[self.products objectAtIndex:i] integerValue]];
52 | if (i != [self.products count]-1) {
53 | [_url appendString:@";"];
54 | }
55 | }
56 | }
57 |
58 | self.URL = [NSURL URLWithString:_url];
59 |
60 | [super commitTransaction];
61 | }
62 |
63 | - (void)request:(APRequest *)request didCompleteWithResults:(NSDictionary *)results
64 | {
65 | NSMutableDictionary *_results = [[NSMutableDictionary alloc] initWithDictionary:results];
66 | for (NSString *key in results) {
67 | [_results setObject:[[APiAdReport alloc] initWithResponse:[results objectForKey:key]] forKey:key];
68 | }
69 |
70 | if (self.transactionCompleted) {
71 | self.transactionCompleted(self, _results);
72 | }
73 | }
74 |
75 | - (void)request:(APRequest *)request didFailWithError:(NSError *)error
76 | {
77 | if (self.transactionFailed) {
78 | self.transactionFailed(self, error);
79 | }
80 | }
81 |
82 | @end
83 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APArchiveTransaction.m:
--------------------------------------------------------------------------------
1 | //
2 | // APArchiveTransaction.m
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-12-04.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import "APArchiveTransaction.h"
10 |
11 | NSString * const APArchiveTransactionTypeAll = @"";
12 | NSString * const APArchiveTransactionTypeLatest = @"latest";
13 | NSString * const APArchiveTransactionTypeDate = @"date";
14 | NSString * const APArchiveTransactionTypeRaw = @"raw";
15 |
16 | @implementation APArchiveTransaction
17 |
18 | - (id)init
19 | {
20 | if ((self = [super init])) {
21 | [self beginTransaction];
22 | }
23 | return self;
24 | }
25 |
26 | - (void)beginTransaction
27 | {
28 | [self beginTransactionWithType:APArchiveTransactionTypeAll];
29 | }
30 |
31 | - (void)beginTransactionWithType:(APArchiveTransactionType)type
32 | {
33 | [super beginTransactionWithURL:nil method:APHTTPMethodGet];
34 | self.request.delegate = self;
35 | self.transactionType = type;
36 | }
37 |
38 | - (void)commitTransaction
39 | {
40 | //
41 | // GET /archive/?type={type}
42 | // GET /archive/latest/?type={type}
43 | // GET /archive/{report_date}/?type={type}
44 | // GET /archive/raw/{id}/
45 | //
46 |
47 | NSMutableString *_url = [[NSMutableString alloc] initWithString:@"archive/"];
48 | if ([self.transactionType isEqualToString:APArchiveTransactionTypeDate]) {
49 | NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
50 | [formatter setDateFormat:@"yyyy-MM-dd"];
51 | [_url appendFormat:@"%@/?type=%@", [formatter stringFromDate:self.date], self.archiveType];
52 | } else if ([self.transactionType isEqualToString:APArchiveTransactionTypeRaw]) {
53 | [_url appendFormat:@"%@/%d/", self.transactionType, self.archiveID];
54 | } else {
55 | if ([self.transactionType length] > 0) {
56 | [_url appendFormat:@"%@/", self.transactionType];
57 | }
58 | [_url appendFormat:@"?type=%@", self.archiveType];
59 | }
60 |
61 | self.URL = [NSURL URLWithString:_url];
62 |
63 | [super commitTransaction];
64 | }
65 |
66 | - (void)request:(APRequest *)request didCompleteWithResults:(NSDictionary *)results
67 | {
68 | NSMutableArray *_archives = [[NSMutableArray alloc] init];
69 | for (NSString *idKey in results) {
70 | [_archives addObject:[[APArchive alloc] initWithResponse:[results objectForKey:idKey]]];
71 | }
72 |
73 | if (self.transactionCompleted) {
74 | self.transactionCompleted(self, _archives);
75 | }
76 | }
77 |
78 | - (void)request:(APRequest *)request didFailWithError:(NSError *)error
79 | {
80 | if (self.transactionFailed) {
81 | self.transactionFailed(self, error);
82 | }
83 | }
84 |
85 | @end
86 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APEventTransaction.m:
--------------------------------------------------------------------------------
1 | //
2 | // APEventTransaction.m
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-12-05.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import "APEventTransaction.h"
10 |
11 | NSString * const APEventTransactionTypeGet = @"GET";
12 | NSString * const APEventTransactionTypeCreate = @"POST";
13 | NSString * const APEventTransactionTypeUpdate = @"PUT";
14 | NSString * const APEventTransactionTypeDelete = @"DELETE";
15 |
16 | @implementation APEventTransaction
17 |
18 | - (void)beginTransactionWithType:(APEventTransactionType)type
19 | {
20 | [super beginTransactionWithURL:nil method:type];
21 | self.request.delegate = self;
22 | self.transactionType = type;
23 | }
24 |
25 | - (void)setTransactionType:(APEventTransactionType)newTransactionType
26 | {
27 | _transactionType = [newTransactionType copy];
28 | self.request.method = _transactionType;
29 | }
30 |
31 | - (void)commitTransaction
32 | {
33 | //
34 | // GET /events/
35 | // POST /events/ -> { caption, date, products }
36 | // PUT /events/ -> { event_id, caption, date, products }
37 | // DELETE /events/{eventId}
38 | //
39 |
40 | NSMutableString *_url = [[NSMutableString alloc] initWithString:@"events/"];
41 |
42 | if ([self.transactionType isEqualToString:APEventTransactionTypeDelete]) {
43 | [_url appendFormat:@"%d/", self.eventID];
44 | } else if ([self.transactionType isEqualToString:APEventTransactionTypeCreate] ||
45 | [self.transactionType isEqualToString:APEventTransactionTypeUpdate]) {
46 | NSMutableDictionary *_data = [[NSMutableDictionary alloc] init];
47 | [_data setObject:self.caption forKey:@"caption"];
48 | [_data setObject:self.date forKey:@"date"];
49 |
50 | // If this API doesn't use JSON data
51 | // NSMutableString *_productIDs = [[NSMutableString alloc] init];
52 | // for (NSInteger i = 0; i < [self.productIDs count]; i++) {
53 | // [_productIDs appendFormat:@"%d", [[self.productIDs objectAtIndex:i] unsignedIntegerValue]];
54 | // if (i != [self.productIDs count]-1) {
55 | // [_productIDs appendString:@","];
56 | // }
57 | // }
58 | //
59 | [_data setObject:self.productIDs forKey:@"products"];
60 |
61 | if ([self.transactionType isEqualToString:APEventTransactionTypeUpdate]) {
62 | [_data setObject:[NSNumber numberWithUnsignedInteger:self.eventID] forKey:@"eventId"];
63 | }
64 |
65 | self.request.arguments = _data;
66 | }
67 |
68 | self.URL = [NSURL URLWithString:_url];
69 |
70 | [super commitTransaction];
71 | }
72 |
73 | - (void)request:(APRequest *)request didCompleteWithResults:(NSDictionary *)results
74 | {
75 | NSMutableArray *_events = [[NSMutableArray alloc] init];
76 | if ([self.transactionType isEqualToString:APEventTransactionTypeDelete]) {
77 | [_events addObject:[NSNumber numberWithBool:self.request.response.statusCode == 200]];
78 | } else {
79 | for (NSString *eventKey in results) {
80 | [_events addObject:[[APEvent alloc] initWithResponse:[results objectForKey:eventKey]]];
81 | }
82 | }
83 |
84 | if (self.transactionCompleted) {
85 | self.transactionCompleted(self, _events);
86 | }
87 | }
88 |
89 | - (void)request:(APRequest *)request didFailWithError:(NSError *)error
90 | {
91 | if (self.transactionFailed) {
92 | self.transactionFailed(self, error);
93 | }
94 | }
95 |
96 | @end
97 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APRankTransaction.m:
--------------------------------------------------------------------------------
1 | //
2 | // APRankTransaction.m
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-11-30.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import "APRankTransaction.h"
10 | #import "APDateRange.h"
11 | #import "APConstants.h"
12 | #import "APRankData.h"
13 |
14 | NSString * const APRankGranularityDaily = @"daily";
15 | NSString * const APRankGranularityHourly = @"hourly";
16 |
17 | @implementation APRankTransaction
18 |
19 | - (id)init
20 | {
21 | if ((self = [super init])) {
22 | [self beginTransaction];
23 | }
24 | return self;
25 | }
26 |
27 | - (void)beginTransaction
28 | {
29 | [super beginTransactionWithURL:nil method:APHTTPMethodGet];
30 | self.request.delegate = self;
31 | self.granularity = APRankGranularityDaily;
32 | }
33 |
34 | - (void)commitTransaction
35 | {
36 | //
37 | // GET ranks/{productIds}/{granularity}/{startDate}/{endDate}/?countries={countries}&filter={filter}
38 | //
39 |
40 | NSMutableString *_url = [[NSMutableString alloc] initWithString:@"ranks/"];
41 | for (NSInteger i = 0; i < [self.products count]; i++) {
42 | NSInteger productID = [[self.products objectAtIndex:i] integerValue];
43 | [_url appendFormat:@"%d", productID];
44 | if (i != [self.products count]-1) {
45 | [_url appendString:@";"];
46 | }
47 | }
48 | [_url appendFormat:@"/%@/", self.granularity];
49 |
50 | NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
51 | [formatter setDateFormat:@"yyyy-MM-dd"];
52 | if (self.dateRange) {
53 | [_url appendFormat:@"%@/%@/", [formatter stringFromDate:self.dateRange.from], [formatter stringFromDate:self.dateRange.to]];
54 | } else {
55 | NSString *todaysDate = [formatter stringFromDate:[NSDate date]];
56 | [_url appendFormat:@"%@/%@/", todaysDate, todaysDate];
57 | }
58 |
59 | if ([self.countries count] > 0 || self.filter > 0) {
60 | [_url appendString:@"?"];
61 |
62 | if ([self.countries count] > 0) {
63 | [_url appendString:@"countries="];
64 | for (NSInteger i = 0; i < [self.countries count]; i++) {
65 | NSInteger isoID = [[self.countries objectAtIndex:i] integerValue];
66 | [_url appendFormat:@"%d", isoID];
67 | if (i != [self.countries count]-1) {
68 | [_url appendString:@";"];
69 | }
70 | }
71 | if (self.filter > 0) {
72 | [_url appendString:@"&"];
73 | }
74 | }
75 |
76 | if (self.filter > 0) {
77 | [_url appendFormat:@"filter=%d", self.filter];
78 | }
79 | }
80 |
81 | self.URL = [NSURL URLWithString:_url];
82 |
83 | [super commitTransaction];
84 | }
85 |
86 | - (void)request:(APRequest *)request didCompleteWithResults:(NSDictionary *)results
87 | {
88 | NSMutableDictionary *newDict = [[NSMutableDictionary alloc] initWithDictionary:results];
89 | for (NSString *key in newDict) {
90 | [newDict setObject:[[APRankData alloc] initWithResponse:[results objectForKey:key]] forKey:key];
91 | }
92 |
93 | if (self.transactionCompleted) {
94 | self.transactionCompleted(self, newDict);
95 | }
96 | }
97 |
98 | - (void)request:(APRequest *)request didFailWithError:(NSError *)error
99 | {
100 | if (self.transactionFailed) {
101 | self.transactionFailed(self, error);
102 | }
103 | }
104 |
105 | @end
106 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APExternalAccountTransaction.m:
--------------------------------------------------------------------------------
1 | //
2 | // APExternalAccountTransaction.m
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-12-05.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import "APExternalAccountTransaction.h"
10 |
11 | NSString * const APExternalAccountTransactionTypeAll = @"";
12 | NSString * const APExternalAccountTransactionTypeLookup = @"GET";
13 | NSString * const APExternalAccountTransactionTypeCreate = @"POST";
14 | NSString * const APExternalAccountTransactionTypeUpdate = @"PUT";
15 | NSString * const APExternalAccountTransactionTypeDelete = @"DELETE";
16 |
17 | @implementation APExternalAccountTransaction
18 |
19 | - (void)beginTransaction
20 | {
21 | [self beginTransactionWithType:APExternalAccountTransactionTypeAll];
22 | }
23 |
24 | - (void)beginTransactionWithType:(APExternalAccountTransactionType)type
25 | {
26 | [super beginTransactionWithURL:nil method:([type length] > 0 ? type : APHTTPMethodGet)];
27 | self.transactionType = type;
28 | self.request.delegate = self;
29 | }
30 |
31 | - (void)commitTransaction
32 | {
33 | //
34 | // GET /external_accounts
35 | // GET /external_accounts/{external_account_id}
36 | // POST /external_accounts
37 | // PUT /external_accounts/{external_account_id}
38 | // DELETE /external_account/{accountId} (success=204)
39 | //
40 |
41 | NSMutableString *_url = [[NSMutableString alloc] initWithString:@"external_accounts/"];
42 | if ([self.transactionType isEqualToString:APExternalAccountTransactionTypeLookup]) {
43 | [_url appendFormat:@"%d/", self.accountID];
44 | } else if ([self.transactionType isEqualToString:APExternalAccountTransactionTypeCreate] ||
45 | [self.transactionType isEqualToString:APExternalAccountTransactionTypeUpdate]) {
46 |
47 | NSMutableDictionary *_data = [[NSMutableDictionary alloc] init];
48 |
49 | if ([self.transactionType isEqualToString:APExternalAccountTransactionTypeCreate]) {
50 | [_data setObject:self.type forKey:@"type"];
51 | } else {
52 | [_data setObject:[NSNumber numberWithUnsignedInteger:self.accountID] forKey:@"accountId"];
53 | }
54 | [_data setObject:self.nickname forKey:@"nickname"];
55 | [_data setObject:self.auth.username forKey:@"username"];
56 | [_data setObject:self.auth.password forKey:@"password"];
57 | [_data setObject:[NSNumber numberWithBool:self.autoImport] forKey:@"auto_import"];
58 |
59 | self.request.arguments = _data;
60 | }
61 |
62 | self.URL = [NSURL URLWithString:_url];
63 |
64 | [super commitTransaction];
65 | }
66 |
67 | - (void)request:(APRequest *)request didCompleteWithResults:(NSDictionary *)results
68 | {
69 | NSMutableArray *_accounts = [[NSMutableArray alloc] init];
70 | if ([self.transactionType isEqualToString:APExternalAccountTransactionTypeDelete]) {
71 | [_accounts addObject:[NSNumber numberWithBool:self.request.response.statusCode == 204]];
72 | } else {
73 | if ([self.transactionType isEqualToString:APExternalAccountTransactionTypeAll]) {
74 | for (NSString *key in results) {
75 | [_accounts addObject:[[APExternalAccount alloc] initWithResponse:[results objectForKey:key]]];
76 | }
77 | } else {
78 | [_accounts addObject:[[APExternalAccount alloc] initWithResponse:results]];
79 | }
80 | }
81 |
82 | if (self.transactionCompleted) {
83 | self.transactionCompleted(self, _accounts);
84 | }
85 | }
86 |
87 | - (void)request:(APRequest *)request didFailWithError:(NSError *)error
88 | {
89 | if (self.transactionFailed) {
90 | self.transactionFailed(self, error);
91 | }
92 | }
93 |
94 | @end
95 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APSalesTransaction.m:
--------------------------------------------------------------------------------
1 | //
2 | // APSalesTransaction.m
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-11-29.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import "APSalesTransaction.h"
10 | #import "APProduct.h"
11 | #import "APDateRange.h"
12 | #import "APConstants.h"
13 |
14 | @implementation APSalesTransaction
15 |
16 | - (id)init
17 | {
18 | if ((self = [super init])) {
19 | [self beginTransaction];
20 | }
21 | return self;
22 | }
23 |
24 | - (void)beginTransaction
25 | {
26 | [super beginTransactionWithURL:nil method:APHTTPMethodGet];
27 | self.request.delegate = self;
28 | self.type = APSalesTypeDates;
29 | }
30 |
31 | - (void)commitTransaction
32 | {
33 | //
34 | // GET /sales/{type}/{startDate}/{endDate}/?data_source={dataSource}&products={productId1;productId2;...productIdN}&country={country}
35 | //
36 |
37 | NSMutableString *_url = [[NSMutableString alloc] initWithString:@"sales/"];
38 | [_url appendFormat:@"%@/", self.type];
39 |
40 | if (self.dateRange) {
41 | NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
42 | [formatter setDateFormat:@"yyyy-MM-dd"];
43 | [_url appendFormat:@"%@/%@/", [formatter stringFromDate:self.dateRange.from], [formatter stringFromDate:self.dateRange.to]];
44 | } else {
45 | if ([self.type rangeOfString:@"dates"].length != 0) {
46 | // We have a problem. For now just add today.
47 | NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
48 | [formatter setDateFormat:@"yyyy-MM-dd"];
49 | NSString *todaysDate = [formatter stringFromDate:[NSDate date]];
50 | [_url appendFormat:@"%@/%@/", todaysDate, todaysDate];
51 | }
52 | }
53 |
54 | BOOL hasProducts = (self.products && [self.products count] > 0);
55 | if (self.dataSource || hasProducts || self.countryISO) {
56 | [_url appendString:@"?"];
57 |
58 | if (self.dataSource) {
59 | [_url appendFormat:@"data_source=%@", self.dataSource];
60 | if (hasProducts || self.countryISO) {
61 | [_url appendString:@"&"];
62 | }
63 | }
64 |
65 | if (hasProducts) {
66 | [_url appendString:@"products="];
67 | for (NSInteger i = 0; i < [self.products count]; i++) {
68 | NSInteger productID = [[self.products objectAtIndex:i] integerValue];
69 | [_url appendFormat:@"%d", productID];
70 | if (i != [self.products count]-1) {
71 | [_url appendString:@";"];
72 | }
73 | }
74 | if (self.countryISO) {
75 | [_url appendString:@"&"];
76 | }
77 | }
78 |
79 | if (self.countryISO) {
80 | [_url appendFormat:@"country=%@", self.countryISO];
81 | }
82 | }
83 |
84 | self.URL = [NSURL URLWithString:_url];
85 |
86 | [super commitTransaction];
87 | }
88 |
89 | - (void)request:(APRequest *)request didCompleteWithResults:(NSDictionary *)results
90 | {
91 | // Replace all actual reports with objects.
92 | NSMutableDictionary *newDict = [[NSMutableDictionary alloc] initWithDictionary:results];
93 |
94 | if ([self.type rangeOfString:@"+"].length == 0) {
95 | for (NSString *key in results) {
96 | [newDict setObject:[[APSalesReport alloc] initWithResponse:[results objectForKey:key]] forKey:key];
97 | }
98 | } else {
99 | for (NSString *key in results) {
100 | NSDictionary *dict = [results objectForKey:key];
101 | for (NSString *key2 in dict) {
102 | APSalesReport *report = [[APSalesReport alloc] initWithResponse:[dict objectForKey:key2]];
103 |
104 | [[newDict objectForKey:key] setObject:report forKey:key2];
105 | }
106 | }
107 | }
108 |
109 | if (self.transactionCompleted) {
110 | self.transactionCompleted(self, newDict);
111 | }
112 | }
113 |
114 | - (void)request:(APRequest *)request didFailWithError:(NSError *)error
115 | {
116 | if (self.transactionFailed) {
117 | self.transactionFailed(self, error);
118 | }
119 | }
120 |
121 | @end
122 |
--------------------------------------------------------------------------------
/AppFiguresAPI/APRequest.m:
--------------------------------------------------------------------------------
1 | //
2 | // APRequest.m
3 | // AppFiguresAPI
4 | //
5 | // Created by Kyle Hickinson on 11-11-29.
6 | // Copyright (c) 2011 Kyle Hickinson. All rights reserved.
7 | //
8 |
9 | #import "APRequest.h"
10 | #import "APConstants.h"
11 |
12 | NSString * const APHTTPMethodGet = @"GET";
13 | NSString * const APHTTPMethodPost = @"POST";
14 | NSString * const APHTTPMethodPut = @"PUT";
15 | NSString * const APHTTPMethodDelete = @"DELETE";
16 |
17 | @interface APRequest ()
18 | @property (nonatomic, strong) NSMutableData *data;
19 | @end
20 |
21 | @implementation APRequest
22 |
23 | - (id)initWithURL:(NSURL *)URL method:(APHTTPMethod)method
24 | {
25 | return [self initWithURL:URL method:method delegate:nil];
26 | }
27 |
28 | - (id)initWithURL:(NSURL *)URL method:(APHTTPMethod)method delegate:(id)delegate
29 | {
30 | if ((self = [super init])) {
31 | self.URL = URL;
32 | self.method = method;
33 | self.delegate = delegate;
34 | }
35 | return self;
36 | }
37 |
38 | - (void)setDelegate:(id)delegate
39 | {
40 | _delegate = delegate;
41 | if (delegate) {
42 | _flags.respondsToComplete = [self.delegate respondsToSelector:@selector(request:didCompleteWithResults:)];
43 | _flags.respondsToFail = [self.delegate respondsToSelector:@selector(request:didFailWithError:)];
44 | }
45 | }
46 |
47 | - (NSURLConnection *)start
48 | {
49 | NSMutableURLRequest *_request = [[NSMutableURLRequest alloc] initWithURL:self.URL];
50 | [_request setHTTPMethod:self.method];
51 | [_request setValue:kAPUserAgent forHTTPHeaderField:@"User-Agent"];
52 | [_request setValue:@"application/json" forHTTPHeaderField:@"Accept"];
53 | [_request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
54 |
55 | NSString *uppercaseMethod = [self.method uppercaseString];
56 | if ([uppercaseMethod isEqualToString:APHTTPMethodPost] ||
57 | [uppercaseMethod isEqualToString:APHTTPMethodPut]) {
58 |
59 | [_request setHTTPBody:[NSJSONSerialization dataWithJSONObject:self.arguments options:kNilOptions error:nil]];
60 | }
61 |
62 | self.connection = [[NSURLConnection alloc] initWithRequest:_request delegate:self];
63 | [self.connection scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSRunLoopCommonModes];
64 | [self.connection start];
65 |
66 | return self.connection;
67 | }
68 |
69 | - (void)cancel
70 | {
71 | [self.connection cancel];
72 | }
73 |
74 | - (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error
75 | {
76 | if (_flags.respondsToFail) {
77 | [self.delegate request:self didFailWithError:error];
78 | }
79 | }
80 |
81 | - (void)connection:(NSURLConnection *)connection didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
82 | {
83 | if ([challenge previousFailureCount] == 0) {
84 | // Return credentials
85 | NSURLCredential *credential = [NSURLCredential credentialWithUser:[self.auth.username lowercaseString]
86 | password:self.auth.password
87 | persistence:NSURLCredentialPersistenceNone];
88 | [[challenge sender] useCredential:credential forAuthenticationChallenge:challenge];
89 |
90 | } else {
91 | // Cancel challenge if it failed previously
92 | [[challenge sender] cancelAuthenticationChallenge:challenge];
93 | }
94 | }
95 |
96 | - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response
97 | {
98 | self.response = (NSHTTPURLResponse *)response;
99 | if (!self.data) {
100 | self.data = [[NSMutableData alloc] init];
101 | } else {
102 | [self.data setLength:0];
103 | }
104 | }
105 |
106 | - (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
107 | {
108 | [self.data appendData:data];
109 | }
110 |
111 | - (void)connectionDidFinishLoading:(NSURLConnection *)connection
112 | {
113 | NSDictionary *results = [NSJSONSerialization JSONObjectWithData:self.data options:kNilOptions error:nil];
114 |
115 | if (_flags.respondsToComplete) {
116 | [self.delegate request:self didCompleteWithResults:results];
117 | }
118 | }
119 |
120 | @end
121 |
--------------------------------------------------------------------------------
/AppFiguresAPI.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | A11AB7EC148C8173009474B7 /* APArchive.h in Headers */ = {isa = PBXBuildFile; fileRef = A11AB7EA148C8173009474B7 /* APArchive.h */; };
11 | A11AB7ED148C8173009474B7 /* APArchive.m in Sources */ = {isa = PBXBuildFile; fileRef = A11AB7EB148C8173009474B7 /* APArchive.m */; };
12 | A11AB7F1148C8347009474B7 /* APArchiveTransaction.h in Headers */ = {isa = PBXBuildFile; fileRef = A11AB7EF148C8347009474B7 /* APArchiveTransaction.h */; };
13 | A11AB7F2148C8347009474B7 /* APArchiveTransaction.m in Sources */ = {isa = PBXBuildFile; fileRef = A11AB7F0148C8347009474B7 /* APArchiveTransaction.m */; };
14 | A11AB7F6148C8807009474B7 /* APEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = A11AB7F4148C8807009474B7 /* APEvent.h */; };
15 | A11AB7F7148C8807009474B7 /* APEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = A11AB7F5148C8807009474B7 /* APEvent.m */; };
16 | A11AB7FB148C89FC009474B7 /* APEventTransaction.h in Headers */ = {isa = PBXBuildFile; fileRef = A11AB7F9148C89FC009474B7 /* APEventTransaction.h */; };
17 | A11AB7FC148C89FC009474B7 /* APEventTransaction.m in Sources */ = {isa = PBXBuildFile; fileRef = A11AB7FA148C89FC009474B7 /* APEventTransaction.m */; };
18 | A11AB804148C9214009474B7 /* APUser.h in Headers */ = {isa = PBXBuildFile; fileRef = A11AB802148C9214009474B7 /* APUser.h */; };
19 | A11AB805148C9214009474B7 /* APUser.m in Sources */ = {isa = PBXBuildFile; fileRef = A11AB803148C9214009474B7 /* APUser.m */; };
20 | A11AB80D148C9552009474B7 /* APUserTransaction.h in Headers */ = {isa = PBXBuildFile; fileRef = A11AB80B148C9552009474B7 /* APUserTransaction.h */; };
21 | A11AB80E148C9552009474B7 /* APUserTransaction.m in Sources */ = {isa = PBXBuildFile; fileRef = A11AB80C148C9552009474B7 /* APUserTransaction.m */; };
22 | A11AB816148C9B3C009474B7 /* APExternalAccountTransaction.h in Headers */ = {isa = PBXBuildFile; fileRef = A11AB814148C9B3C009474B7 /* APExternalAccountTransaction.h */; };
23 | A11AB817148C9B3C009474B7 /* APExternalAccountTransaction.m in Sources */ = {isa = PBXBuildFile; fileRef = A11AB815148C9B3C009474B7 /* APExternalAccountTransaction.m */; };
24 | A13F2C741484A7BD00F71B2F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A13F2C731484A7BD00F71B2F /* Foundation.framework */; };
25 | A13F2C7A1484A7BD00F71B2F /* AppFiguresAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = A13F2C791484A7BD00F71B2F /* AppFiguresAPI.m */; };
26 | A13F2C811484A7E600F71B2F /* APConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = A13F2C801484A7E600F71B2F /* APConstants.h */; };
27 | A13F2C8F1484AA2C00F71B2F /* APDateRange.h in Headers */ = {isa = PBXBuildFile; fileRef = A13F2C8D1484AA2C00F71B2F /* APDateRange.h */; };
28 | A13F2C901484AA2C00F71B2F /* APDateRange.m in Sources */ = {isa = PBXBuildFile; fileRef = A13F2C8E1484AA2C00F71B2F /* APDateRange.m */; };
29 | A13F2C931484ADF000F71B2F /* APRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = A13F2C911484ADF000F71B2F /* APRequest.h */; };
30 | A13F2C941484ADF000F71B2F /* APRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = A13F2C921484ADF000F71B2F /* APRequest.m */; };
31 | A13F2C9C1484BAA300F71B2F /* APSalesReport.h in Headers */ = {isa = PBXBuildFile; fileRef = A13F2C9A1484BAA300F71B2F /* APSalesReport.h */; };
32 | A13F2C9D1484BAA300F71B2F /* APSalesReport.m in Sources */ = {isa = PBXBuildFile; fileRef = A13F2C9B1484BAA300F71B2F /* APSalesReport.m */; };
33 | A13F2CA11484BF8300F71B2F /* APProduct.h in Headers */ = {isa = PBXBuildFile; fileRef = A13F2C9F1484BF8300F71B2F /* APProduct.h */; };
34 | A13F2CA21484BF8300F71B2F /* APProduct.m in Sources */ = {isa = PBXBuildFile; fileRef = A13F2CA01484BF8300F71B2F /* APProduct.m */; };
35 | A162D279148B48DE003884B8 /* APReview.h in Headers */ = {isa = PBXBuildFile; fileRef = A162D277148B48DE003884B8 /* APReview.h */; };
36 | A162D27A148B48DE003884B8 /* APReview.m in Sources */ = {isa = PBXBuildFile; fileRef = A162D278148B48DE003884B8 /* APReview.m */; };
37 | A162D27D148B4E89003884B8 /* APStoreRating.h in Headers */ = {isa = PBXBuildFile; fileRef = A162D27B148B4E89003884B8 /* APStoreRating.h */; };
38 | A162D27E148B4E89003884B8 /* APStoreRating.m in Sources */ = {isa = PBXBuildFile; fileRef = A162D27C148B4E89003884B8 /* APStoreRating.m */; };
39 | A162D282148B5193003884B8 /* APReviewTransaction.h in Headers */ = {isa = PBXBuildFile; fileRef = A162D280148B5193003884B8 /* APReviewTransaction.h */; };
40 | A162D283148B5193003884B8 /* APReviewTransaction.m in Sources */ = {isa = PBXBuildFile; fileRef = A162D281148B5193003884B8 /* APReviewTransaction.m */; };
41 | A162D287148B5B52003884B8 /* APiAdReport.h in Headers */ = {isa = PBXBuildFile; fileRef = A162D285148B5B52003884B8 /* APiAdReport.h */; };
42 | A162D288148B5B52003884B8 /* APiAdReport.m in Sources */ = {isa = PBXBuildFile; fileRef = A162D286148B5B52003884B8 /* APiAdReport.m */; };
43 | A162D28C148B5CAB003884B8 /* APiAdTransaction.h in Headers */ = {isa = PBXBuildFile; fileRef = A162D28A148B5CAB003884B8 /* APiAdTransaction.h */; };
44 | A162D28D148B5CAB003884B8 /* APiAdTransaction.m in Sources */ = {isa = PBXBuildFile; fileRef = A162D28B148B5CAB003884B8 /* APiAdTransaction.m */; };
45 | A16EF7E51485900E00A90921 /* APSalesTransaction.h in Headers */ = {isa = PBXBuildFile; fileRef = A16EF7E31485900E00A90921 /* APSalesTransaction.h */; };
46 | A16EF7E61485900E00A90921 /* APSalesTransaction.m in Sources */ = {isa = PBXBuildFile; fileRef = A16EF7E41485900E00A90921 /* APSalesTransaction.m */; };
47 | A16EF7EB1485904700A90921 /* APTransaction.h in Headers */ = {isa = PBXBuildFile; fileRef = A16EF7E91485904700A90921 /* APTransaction.h */; };
48 | A16EF7EC1485904700A90921 /* APTransaction.m in Sources */ = {isa = PBXBuildFile; fileRef = A16EF7EA1485904700A90921 /* APTransaction.m */; };
49 | A16EF7F214859E1C00A90921 /* APAuthentication.h in Headers */ = {isa = PBXBuildFile; fileRef = A16EF7F014859E1C00A90921 /* APAuthentication.h */; };
50 | A16EF7F314859E1C00A90921 /* APAuthentication.m in Sources */ = {isa = PBXBuildFile; fileRef = A16EF7F114859E1C00A90921 /* APAuthentication.m */; };
51 | A16EF7F61485EE0A00A90921 /* APRegionSalesReport.h in Headers */ = {isa = PBXBuildFile; fileRef = A16EF7F41485EE0A00A90921 /* APRegionSalesReport.h */; };
52 | A16EF7F71485EE0A00A90921 /* APRegionSalesReport.m in Sources */ = {isa = PBXBuildFile; fileRef = A16EF7F51485EE0A00A90921 /* APRegionSalesReport.m */; };
53 | A16EF7FE1485EFCB00A90921 /* APRankData.h in Headers */ = {isa = PBXBuildFile; fileRef = A16EF7FC1485EFCB00A90921 /* APRankData.h */; };
54 | A16EF7FF1485EFCB00A90921 /* APRankData.m in Sources */ = {isa = PBXBuildFile; fileRef = A16EF7FD1485EFCB00A90921 /* APRankData.m */; };
55 | A16EF8041485F0C900A90921 /* APRankTransaction.h in Headers */ = {isa = PBXBuildFile; fileRef = A16EF8021485F0C900A90921 /* APRankTransaction.h */; };
56 | A16EF8051485F0C900A90921 /* APRankTransaction.m in Sources */ = {isa = PBXBuildFile; fileRef = A16EF8031485F0C900A90921 /* APRankTransaction.m */; };
57 | A1F0607E1491DBDD007E2CC7 /* APAccount.h in Headers */ = {isa = PBXBuildFile; fileRef = A1F0607C1491DBDD007E2CC7 /* APAccount.h */; };
58 | A1F0607F1491DBDD007E2CC7 /* APAccount.m in Sources */ = {isa = PBXBuildFile; fileRef = A1F0607D1491DBDD007E2CC7 /* APAccount.m */; };
59 | A1F060821491DBE9007E2CC7 /* APExternalAccount.h in Headers */ = {isa = PBXBuildFile; fileRef = A1F060801491DBE9007E2CC7 /* APExternalAccount.h */; };
60 | A1F060831491DBE9007E2CC7 /* APExternalAccount.m in Sources */ = {isa = PBXBuildFile; fileRef = A1F060811491DBE9007E2CC7 /* APExternalAccount.m */; };
61 | /* End PBXBuildFile section */
62 |
63 | /* Begin PBXFileReference section */
64 | A11AB7EA148C8173009474B7 /* APArchive.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APArchive.h; sourceTree = ""; };
65 | A11AB7EB148C8173009474B7 /* APArchive.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = APArchive.m; sourceTree = ""; };
66 | A11AB7EF148C8347009474B7 /* APArchiveTransaction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APArchiveTransaction.h; sourceTree = ""; };
67 | A11AB7F0148C8347009474B7 /* APArchiveTransaction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = APArchiveTransaction.m; sourceTree = ""; };
68 | A11AB7F4148C8807009474B7 /* APEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APEvent.h; sourceTree = ""; };
69 | A11AB7F5148C8807009474B7 /* APEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = APEvent.m; sourceTree = ""; };
70 | A11AB7F9148C89FC009474B7 /* APEventTransaction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APEventTransaction.h; sourceTree = ""; };
71 | A11AB7FA148C89FC009474B7 /* APEventTransaction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = APEventTransaction.m; sourceTree = ""; };
72 | A11AB802148C9214009474B7 /* APUser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = APUser.h; path = AppFiguresAPI/APUser.h; sourceTree = ""; };
73 | A11AB803148C9214009474B7 /* APUser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = APUser.m; path = AppFiguresAPI/APUser.m; sourceTree = ""; };
74 | A11AB80B148C9552009474B7 /* APUserTransaction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APUserTransaction.h; sourceTree = ""; };
75 | A11AB80C148C9552009474B7 /* APUserTransaction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = APUserTransaction.m; sourceTree = ""; };
76 | A11AB814148C9B3C009474B7 /* APExternalAccountTransaction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APExternalAccountTransaction.h; sourceTree = ""; };
77 | A11AB815148C9B3C009474B7 /* APExternalAccountTransaction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = APExternalAccountTransaction.m; sourceTree = ""; };
78 | A13F2C701484A7BD00F71B2F /* libAppFiguresAPI.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libAppFiguresAPI.a; sourceTree = BUILT_PRODUCTS_DIR; };
79 | A13F2C731484A7BD00F71B2F /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
80 | A13F2C771484A7BD00F71B2F /* AppFiguresAPI-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "AppFiguresAPI-Prefix.pch"; sourceTree = ""; };
81 | A13F2C781484A7BD00F71B2F /* AppFiguresAPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppFiguresAPI.h; sourceTree = ""; };
82 | A13F2C791484A7BD00F71B2F /* AppFiguresAPI.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppFiguresAPI.m; sourceTree = ""; };
83 | A13F2C801484A7E600F71B2F /* APConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APConstants.h; sourceTree = ""; };
84 | A13F2C8D1484AA2C00F71B2F /* APDateRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APDateRange.h; sourceTree = ""; };
85 | A13F2C8E1484AA2C00F71B2F /* APDateRange.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = APDateRange.m; sourceTree = ""; };
86 | A13F2C911484ADF000F71B2F /* APRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APRequest.h; sourceTree = ""; };
87 | A13F2C921484ADF000F71B2F /* APRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = APRequest.m; sourceTree = ""; };
88 | A13F2C9A1484BAA300F71B2F /* APSalesReport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APSalesReport.h; sourceTree = ""; };
89 | A13F2C9B1484BAA300F71B2F /* APSalesReport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = APSalesReport.m; sourceTree = ""; };
90 | A13F2C9F1484BF8300F71B2F /* APProduct.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APProduct.h; sourceTree = ""; };
91 | A13F2CA01484BF8300F71B2F /* APProduct.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = APProduct.m; sourceTree = ""; };
92 | A162D277148B48DE003884B8 /* APReview.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APReview.h; sourceTree = ""; };
93 | A162D278148B48DE003884B8 /* APReview.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = APReview.m; sourceTree = ""; };
94 | A162D27B148B4E89003884B8 /* APStoreRating.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APStoreRating.h; sourceTree = ""; };
95 | A162D27C148B4E89003884B8 /* APStoreRating.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = APStoreRating.m; sourceTree = ""; };
96 | A162D280148B5193003884B8 /* APReviewTransaction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APReviewTransaction.h; sourceTree = ""; };
97 | A162D281148B5193003884B8 /* APReviewTransaction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = APReviewTransaction.m; sourceTree = ""; };
98 | A162D285148B5B52003884B8 /* APiAdReport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APiAdReport.h; sourceTree = ""; };
99 | A162D286148B5B52003884B8 /* APiAdReport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = APiAdReport.m; sourceTree = ""; };
100 | A162D28A148B5CAB003884B8 /* APiAdTransaction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APiAdTransaction.h; sourceTree = ""; };
101 | A162D28B148B5CAB003884B8 /* APiAdTransaction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = APiAdTransaction.m; sourceTree = ""; };
102 | A16EF7E31485900E00A90921 /* APSalesTransaction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APSalesTransaction.h; sourceTree = ""; };
103 | A16EF7E41485900E00A90921 /* APSalesTransaction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = APSalesTransaction.m; sourceTree = ""; };
104 | A16EF7E91485904700A90921 /* APTransaction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APTransaction.h; sourceTree = ""; };
105 | A16EF7EA1485904700A90921 /* APTransaction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = APTransaction.m; sourceTree = ""; };
106 | A16EF7F014859E1C00A90921 /* APAuthentication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APAuthentication.h; sourceTree = ""; };
107 | A16EF7F114859E1C00A90921 /* APAuthentication.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = APAuthentication.m; sourceTree = ""; };
108 | A16EF7F41485EE0A00A90921 /* APRegionSalesReport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APRegionSalesReport.h; sourceTree = ""; };
109 | A16EF7F51485EE0A00A90921 /* APRegionSalesReport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = APRegionSalesReport.m; sourceTree = ""; };
110 | A16EF7FC1485EFCB00A90921 /* APRankData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APRankData.h; sourceTree = ""; };
111 | A16EF7FD1485EFCB00A90921 /* APRankData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = APRankData.m; sourceTree = ""; };
112 | A16EF8021485F0C900A90921 /* APRankTransaction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APRankTransaction.h; sourceTree = ""; };
113 | A16EF8031485F0C900A90921 /* APRankTransaction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = APRankTransaction.m; sourceTree = ""; };
114 | A1F0607C1491DBDD007E2CC7 /* APAccount.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = APAccount.h; path = AppFiguresAPI/APAccount.h; sourceTree = ""; };
115 | A1F0607D1491DBDD007E2CC7 /* APAccount.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = APAccount.m; path = AppFiguresAPI/APAccount.m; sourceTree = ""; };
116 | A1F060801491DBE9007E2CC7 /* APExternalAccount.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = APExternalAccount.h; path = AppFiguresAPI/APExternalAccount.h; sourceTree = ""; };
117 | A1F060811491DBE9007E2CC7 /* APExternalAccount.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = APExternalAccount.m; path = AppFiguresAPI/APExternalAccount.m; sourceTree = ""; };
118 | /* End PBXFileReference section */
119 |
120 | /* Begin PBXFrameworksBuildPhase section */
121 | A13F2C6D1484A7BD00F71B2F /* Frameworks */ = {
122 | isa = PBXFrameworksBuildPhase;
123 | buildActionMask = 2147483647;
124 | files = (
125 | A13F2C741484A7BD00F71B2F /* Foundation.framework in Frameworks */,
126 | );
127 | runOnlyForDeploymentPostprocessing = 0;
128 | };
129 | /* End PBXFrameworksBuildPhase section */
130 |
131 | /* Begin PBXGroup section */
132 | A11AB7E8148C815C009474B7 /* Archive */ = {
133 | isa = PBXGroup;
134 | children = (
135 | A11AB7EA148C8173009474B7 /* APArchive.h */,
136 | A11AB7EB148C8173009474B7 /* APArchive.m */,
137 | );
138 | name = Archive;
139 | sourceTree = "";
140 | };
141 | A11AB7EE148C8332009474B7 /* Archives */ = {
142 | isa = PBXGroup;
143 | children = (
144 | A11AB7EF148C8347009474B7 /* APArchiveTransaction.h */,
145 | A11AB7F0148C8347009474B7 /* APArchiveTransaction.m */,
146 | );
147 | name = Archives;
148 | sourceTree = "";
149 | };
150 | A11AB7F3148C87FB009474B7 /* Events */ = {
151 | isa = PBXGroup;
152 | children = (
153 | A11AB7F4148C8807009474B7 /* APEvent.h */,
154 | A11AB7F5148C8807009474B7 /* APEvent.m */,
155 | );
156 | name = Events;
157 | sourceTree = "";
158 | };
159 | A11AB7F8148C89EF009474B7 /* Events */ = {
160 | isa = PBXGroup;
161 | children = (
162 | A11AB7F9148C89FC009474B7 /* APEventTransaction.h */,
163 | A11AB7FA148C89FC009474B7 /* APEventTransaction.m */,
164 | );
165 | name = Events;
166 | sourceTree = "";
167 | };
168 | A11AB7FD148C91EF009474B7 /* Users */ = {
169 | isa = PBXGroup;
170 | children = (
171 | A13F2C9E1484BF7400F71B2F /* Products */,
172 | A11AB802148C9214009474B7 /* APUser.h */,
173 | A11AB803148C9214009474B7 /* APUser.m */,
174 | A1F0607C1491DBDD007E2CC7 /* APAccount.h */,
175 | A1F0607D1491DBDD007E2CC7 /* APAccount.m */,
176 | A1F060801491DBE9007E2CC7 /* APExternalAccount.h */,
177 | A1F060811491DBE9007E2CC7 /* APExternalAccount.m */,
178 | );
179 | name = Users;
180 | path = ..;
181 | sourceTree = "";
182 | };
183 | A11AB80A148C9544009474B7 /* Users */ = {
184 | isa = PBXGroup;
185 | children = (
186 | A11AB80B148C9552009474B7 /* APUserTransaction.h */,
187 | A11AB80C148C9552009474B7 /* APUserTransaction.m */,
188 | );
189 | name = Users;
190 | sourceTree = "";
191 | };
192 | A11AB813148C9ADE009474B7 /* External Accounts */ = {
193 | isa = PBXGroup;
194 | children = (
195 | A11AB814148C9B3C009474B7 /* APExternalAccountTransaction.h */,
196 | A11AB815148C9B3C009474B7 /* APExternalAccountTransaction.m */,
197 | );
198 | name = "External Accounts";
199 | sourceTree = "";
200 | };
201 | A13F2C651484A7BD00F71B2F = {
202 | isa = PBXGroup;
203 | children = (
204 | A13F2C751484A7BD00F71B2F /* AppFiguresAPI */,
205 | A13F2C721484A7BD00F71B2F /* Frameworks */,
206 | A13F2C711484A7BD00F71B2F /* Products */,
207 | );
208 | sourceTree = "";
209 | };
210 | A13F2C711484A7BD00F71B2F /* Products */ = {
211 | isa = PBXGroup;
212 | children = (
213 | A13F2C701484A7BD00F71B2F /* libAppFiguresAPI.a */,
214 | );
215 | name = Products;
216 | sourceTree = "";
217 | };
218 | A13F2C721484A7BD00F71B2F /* Frameworks */ = {
219 | isa = PBXGroup;
220 | children = (
221 | A13F2C731484A7BD00F71B2F /* Foundation.framework */,
222 | );
223 | name = Frameworks;
224 | sourceTree = "";
225 | };
226 | A13F2C751484A7BD00F71B2F /* AppFiguresAPI */ = {
227 | isa = PBXGroup;
228 | children = (
229 | A11AB7FD148C91EF009474B7 /* Users */,
230 | A11AB7F3148C87FB009474B7 /* Events */,
231 | A11AB7E8148C815C009474B7 /* Archive */,
232 | A162D284148B5B2A003884B8 /* iAds */,
233 | A162D275148B48C8003884B8 /* Ratings + Reviews */,
234 | A16EF7F81485EF6600A90921 /* Ranks */,
235 | A16EF7E81485903C00A90921 /* Transaction */,
236 | A13F2C991484BA9100F71B2F /* Sales */,
237 | A13F2C821484A84200F71B2F /* Networking */,
238 | A13F2C781484A7BD00F71B2F /* AppFiguresAPI.h */,
239 | A13F2C791484A7BD00F71B2F /* AppFiguresAPI.m */,
240 | A13F2C8D1484AA2C00F71B2F /* APDateRange.h */,
241 | A13F2C8E1484AA2C00F71B2F /* APDateRange.m */,
242 | A13F2C761484A7BD00F71B2F /* Supporting Files */,
243 | );
244 | path = AppFiguresAPI;
245 | sourceTree = "";
246 | };
247 | A13F2C761484A7BD00F71B2F /* Supporting Files */ = {
248 | isa = PBXGroup;
249 | children = (
250 | A13F2C801484A7E600F71B2F /* APConstants.h */,
251 | A13F2C771484A7BD00F71B2F /* AppFiguresAPI-Prefix.pch */,
252 | );
253 | name = "Supporting Files";
254 | sourceTree = "";
255 | };
256 | A13F2C821484A84200F71B2F /* Networking */ = {
257 | isa = PBXGroup;
258 | children = (
259 | A13F2C911484ADF000F71B2F /* APRequest.h */,
260 | A13F2C921484ADF000F71B2F /* APRequest.m */,
261 | A16EF7F014859E1C00A90921 /* APAuthentication.h */,
262 | A16EF7F114859E1C00A90921 /* APAuthentication.m */,
263 | );
264 | name = Networking;
265 | sourceTree = "";
266 | };
267 | A13F2C991484BA9100F71B2F /* Sales */ = {
268 | isa = PBXGroup;
269 | children = (
270 | A13F2C9A1484BAA300F71B2F /* APSalesReport.h */,
271 | A13F2C9B1484BAA300F71B2F /* APSalesReport.m */,
272 | A16EF7F41485EE0A00A90921 /* APRegionSalesReport.h */,
273 | A16EF7F51485EE0A00A90921 /* APRegionSalesReport.m */,
274 | );
275 | name = Sales;
276 | sourceTree = "";
277 | };
278 | A13F2C9E1484BF7400F71B2F /* Products */ = {
279 | isa = PBXGroup;
280 | children = (
281 | A13F2C9F1484BF8300F71B2F /* APProduct.h */,
282 | A13F2CA01484BF8300F71B2F /* APProduct.m */,
283 | );
284 | name = Products;
285 | path = AppFiguresAPI;
286 | sourceTree = "";
287 | };
288 | A162D275148B48C8003884B8 /* Ratings + Reviews */ = {
289 | isa = PBXGroup;
290 | children = (
291 | A162D277148B48DE003884B8 /* APReview.h */,
292 | A162D278148B48DE003884B8 /* APReview.m */,
293 | A162D27B148B4E89003884B8 /* APStoreRating.h */,
294 | A162D27C148B4E89003884B8 /* APStoreRating.m */,
295 | );
296 | name = "Ratings + Reviews";
297 | sourceTree = "";
298 | };
299 | A162D27F148B517C003884B8 /* Ratings + Reviews */ = {
300 | isa = PBXGroup;
301 | children = (
302 | A162D280148B5193003884B8 /* APReviewTransaction.h */,
303 | A162D281148B5193003884B8 /* APReviewTransaction.m */,
304 | );
305 | name = "Ratings + Reviews";
306 | sourceTree = "";
307 | };
308 | A162D284148B5B2A003884B8 /* iAds */ = {
309 | isa = PBXGroup;
310 | children = (
311 | A162D285148B5B52003884B8 /* APiAdReport.h */,
312 | A162D286148B5B52003884B8 /* APiAdReport.m */,
313 | );
314 | name = iAds;
315 | sourceTree = "";
316 | };
317 | A162D289148B5C94003884B8 /* iAds */ = {
318 | isa = PBXGroup;
319 | children = (
320 | A162D28A148B5CAB003884B8 /* APiAdTransaction.h */,
321 | A162D28B148B5CAB003884B8 /* APiAdTransaction.m */,
322 | );
323 | name = iAds;
324 | sourceTree = "";
325 | };
326 | A16EF7E81485903C00A90921 /* Transaction */ = {
327 | isa = PBXGroup;
328 | children = (
329 | A11AB813148C9ADE009474B7 /* External Accounts */,
330 | A11AB80A148C9544009474B7 /* Users */,
331 | A11AB7F8148C89EF009474B7 /* Events */,
332 | A11AB7EE148C8332009474B7 /* Archives */,
333 | A162D289148B5C94003884B8 /* iAds */,
334 | A162D27F148B517C003884B8 /* Ratings + Reviews */,
335 | A16EF8011485F0B900A90921 /* Ranks */,
336 | A16EF7ED1485909900A90921 /* Sales */,
337 | A16EF7E91485904700A90921 /* APTransaction.h */,
338 | A16EF7EA1485904700A90921 /* APTransaction.m */,
339 | );
340 | name = Transaction;
341 | sourceTree = "";
342 | };
343 | A16EF7ED1485909900A90921 /* Sales */ = {
344 | isa = PBXGroup;
345 | children = (
346 | A16EF7E31485900E00A90921 /* APSalesTransaction.h */,
347 | A16EF7E41485900E00A90921 /* APSalesTransaction.m */,
348 | );
349 | name = Sales;
350 | sourceTree = "";
351 | };
352 | A16EF7F81485EF6600A90921 /* Ranks */ = {
353 | isa = PBXGroup;
354 | children = (
355 | A16EF7FC1485EFCB00A90921 /* APRankData.h */,
356 | A16EF7FD1485EFCB00A90921 /* APRankData.m */,
357 | );
358 | name = Ranks;
359 | sourceTree = "";
360 | };
361 | A16EF8011485F0B900A90921 /* Ranks */ = {
362 | isa = PBXGroup;
363 | children = (
364 | A16EF8021485F0C900A90921 /* APRankTransaction.h */,
365 | A16EF8031485F0C900A90921 /* APRankTransaction.m */,
366 | );
367 | name = Ranks;
368 | sourceTree = "";
369 | };
370 | /* End PBXGroup section */
371 |
372 | /* Begin PBXHeadersBuildPhase section */
373 | A13F2C6E1484A7BD00F71B2F /* Headers */ = {
374 | isa = PBXHeadersBuildPhase;
375 | buildActionMask = 2147483647;
376 | files = (
377 | A13F2C811484A7E600F71B2F /* APConstants.h in Headers */,
378 | A13F2C8F1484AA2C00F71B2F /* APDateRange.h in Headers */,
379 | A13F2C931484ADF000F71B2F /* APRequest.h in Headers */,
380 | A13F2C9C1484BAA300F71B2F /* APSalesReport.h in Headers */,
381 | A13F2CA11484BF8300F71B2F /* APProduct.h in Headers */,
382 | A16EF7E51485900E00A90921 /* APSalesTransaction.h in Headers */,
383 | A16EF7EB1485904700A90921 /* APTransaction.h in Headers */,
384 | A16EF7F214859E1C00A90921 /* APAuthentication.h in Headers */,
385 | A16EF7F61485EE0A00A90921 /* APRegionSalesReport.h in Headers */,
386 | A16EF7FE1485EFCB00A90921 /* APRankData.h in Headers */,
387 | A16EF8041485F0C900A90921 /* APRankTransaction.h in Headers */,
388 | A162D279148B48DE003884B8 /* APReview.h in Headers */,
389 | A162D27D148B4E89003884B8 /* APStoreRating.h in Headers */,
390 | A162D282148B5193003884B8 /* APReviewTransaction.h in Headers */,
391 | A162D287148B5B52003884B8 /* APiAdReport.h in Headers */,
392 | A162D28C148B5CAB003884B8 /* APiAdTransaction.h in Headers */,
393 | A11AB7EC148C8173009474B7 /* APArchive.h in Headers */,
394 | A11AB7F1148C8347009474B7 /* APArchiveTransaction.h in Headers */,
395 | A11AB7F6148C8807009474B7 /* APEvent.h in Headers */,
396 | A11AB7FB148C89FC009474B7 /* APEventTransaction.h in Headers */,
397 | A11AB804148C9214009474B7 /* APUser.h in Headers */,
398 | A11AB80D148C9552009474B7 /* APUserTransaction.h in Headers */,
399 | A11AB816148C9B3C009474B7 /* APExternalAccountTransaction.h in Headers */,
400 | A1F0607E1491DBDD007E2CC7 /* APAccount.h in Headers */,
401 | A1F060821491DBE9007E2CC7 /* APExternalAccount.h in Headers */,
402 | );
403 | runOnlyForDeploymentPostprocessing = 0;
404 | };
405 | /* End PBXHeadersBuildPhase section */
406 |
407 | /* Begin PBXNativeTarget section */
408 | A13F2C6F1484A7BD00F71B2F /* AppFiguresAPI */ = {
409 | isa = PBXNativeTarget;
410 | buildConfigurationList = A13F2C7D1484A7BD00F71B2F /* Build configuration list for PBXNativeTarget "AppFiguresAPI" */;
411 | buildPhases = (
412 | A13F2C6C1484A7BD00F71B2F /* Sources */,
413 | A13F2C6D1484A7BD00F71B2F /* Frameworks */,
414 | A13F2C6E1484A7BD00F71B2F /* Headers */,
415 | );
416 | buildRules = (
417 | );
418 | dependencies = (
419 | );
420 | name = AppFiguresAPI;
421 | productName = AppFiguresAPI;
422 | productReference = A13F2C701484A7BD00F71B2F /* libAppFiguresAPI.a */;
423 | productType = "com.apple.product-type.library.static";
424 | };
425 | /* End PBXNativeTarget section */
426 |
427 | /* Begin PBXProject section */
428 | A13F2C671484A7BD00F71B2F /* Project object */ = {
429 | isa = PBXProject;
430 | attributes = {
431 | LastUpgradeCheck = 0420;
432 | };
433 | buildConfigurationList = A13F2C6A1484A7BD00F71B2F /* Build configuration list for PBXProject "AppFiguresAPI" */;
434 | compatibilityVersion = "Xcode 3.2";
435 | developmentRegion = English;
436 | hasScannedForEncodings = 0;
437 | knownRegions = (
438 | en,
439 | );
440 | mainGroup = A13F2C651484A7BD00F71B2F;
441 | productRefGroup = A13F2C711484A7BD00F71B2F /* Products */;
442 | projectDirPath = "";
443 | projectRoot = "";
444 | targets = (
445 | A13F2C6F1484A7BD00F71B2F /* AppFiguresAPI */,
446 | );
447 | };
448 | /* End PBXProject section */
449 |
450 | /* Begin PBXSourcesBuildPhase section */
451 | A13F2C6C1484A7BD00F71B2F /* Sources */ = {
452 | isa = PBXSourcesBuildPhase;
453 | buildActionMask = 2147483647;
454 | files = (
455 | A13F2C7A1484A7BD00F71B2F /* AppFiguresAPI.m in Sources */,
456 | A13F2C901484AA2C00F71B2F /* APDateRange.m in Sources */,
457 | A13F2C941484ADF000F71B2F /* APRequest.m in Sources */,
458 | A13F2C9D1484BAA300F71B2F /* APSalesReport.m in Sources */,
459 | A13F2CA21484BF8300F71B2F /* APProduct.m in Sources */,
460 | A16EF7E61485900E00A90921 /* APSalesTransaction.m in Sources */,
461 | A16EF7EC1485904700A90921 /* APTransaction.m in Sources */,
462 | A16EF7F314859E1C00A90921 /* APAuthentication.m in Sources */,
463 | A16EF7F71485EE0A00A90921 /* APRegionSalesReport.m in Sources */,
464 | A16EF7FF1485EFCB00A90921 /* APRankData.m in Sources */,
465 | A16EF8051485F0C900A90921 /* APRankTransaction.m in Sources */,
466 | A162D27A148B48DE003884B8 /* APReview.m in Sources */,
467 | A162D27E148B4E89003884B8 /* APStoreRating.m in Sources */,
468 | A162D283148B5193003884B8 /* APReviewTransaction.m in Sources */,
469 | A162D288148B5B52003884B8 /* APiAdReport.m in Sources */,
470 | A162D28D148B5CAB003884B8 /* APiAdTransaction.m in Sources */,
471 | A11AB7ED148C8173009474B7 /* APArchive.m in Sources */,
472 | A11AB7F2148C8347009474B7 /* APArchiveTransaction.m in Sources */,
473 | A11AB7F7148C8807009474B7 /* APEvent.m in Sources */,
474 | A11AB7FC148C89FC009474B7 /* APEventTransaction.m in Sources */,
475 | A11AB805148C9214009474B7 /* APUser.m in Sources */,
476 | A11AB80E148C9552009474B7 /* APUserTransaction.m in Sources */,
477 | A11AB817148C9B3C009474B7 /* APExternalAccountTransaction.m in Sources */,
478 | A1F0607F1491DBDD007E2CC7 /* APAccount.m in Sources */,
479 | A1F060831491DBE9007E2CC7 /* APExternalAccount.m in Sources */,
480 | );
481 | runOnlyForDeploymentPostprocessing = 0;
482 | };
483 | /* End PBXSourcesBuildPhase section */
484 |
485 | /* Begin XCBuildConfiguration section */
486 | A13F2C7B1484A7BD00F71B2F /* Debug */ = {
487 | isa = XCBuildConfiguration;
488 | buildSettings = {
489 | ALWAYS_SEARCH_USER_PATHS = NO;
490 | ARCHS = "$(ARCHS_STANDARD_32_BIT)";
491 | CLANG_ENABLE_OBJC_ARC = YES;
492 | COPY_PHASE_STRIP = NO;
493 | GCC_C_LANGUAGE_STANDARD = gnu99;
494 | GCC_DYNAMIC_NO_PIC = NO;
495 | GCC_OPTIMIZATION_LEVEL = 0;
496 | GCC_PREPROCESSOR_DEFINITIONS = (
497 | "DEBUG=1",
498 | "$(inherited)",
499 | );
500 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
501 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
502 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
503 | GCC_WARN_ABOUT_RETURN_TYPE = YES;
504 | GCC_WARN_UNUSED_VARIABLE = YES;
505 | IPHONEOS_DEPLOYMENT_TARGET = 5.0;
506 | SDKROOT = iphoneos;
507 | };
508 | name = Debug;
509 | };
510 | A13F2C7C1484A7BD00F71B2F /* Release */ = {
511 | isa = XCBuildConfiguration;
512 | buildSettings = {
513 | ALWAYS_SEARCH_USER_PATHS = NO;
514 | ARCHS = "$(ARCHS_STANDARD_32_BIT)";
515 | CLANG_ENABLE_OBJC_ARC = YES;
516 | COPY_PHASE_STRIP = YES;
517 | GCC_C_LANGUAGE_STANDARD = gnu99;
518 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
519 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
520 | GCC_WARN_ABOUT_RETURN_TYPE = YES;
521 | GCC_WARN_UNUSED_VARIABLE = YES;
522 | IPHONEOS_DEPLOYMENT_TARGET = 5.0;
523 | SDKROOT = iphoneos;
524 | VALIDATE_PRODUCT = YES;
525 | };
526 | name = Release;
527 | };
528 | A13F2C7E1484A7BD00F71B2F /* Debug */ = {
529 | isa = XCBuildConfiguration;
530 | buildSettings = {
531 | DSTROOT = /tmp/AppFiguresAPI.dst;
532 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
533 | GCC_PREFIX_HEADER = "AppFiguresAPI/AppFiguresAPI-Prefix.pch";
534 | OTHER_LDFLAGS = "-ObjC";
535 | PRODUCT_NAME = "$(TARGET_NAME)";
536 | SKIP_INSTALL = YES;
537 | };
538 | name = Debug;
539 | };
540 | A13F2C7F1484A7BD00F71B2F /* Release */ = {
541 | isa = XCBuildConfiguration;
542 | buildSettings = {
543 | DSTROOT = /tmp/AppFiguresAPI.dst;
544 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
545 | GCC_PREFIX_HEADER = "AppFiguresAPI/AppFiguresAPI-Prefix.pch";
546 | OTHER_LDFLAGS = "-ObjC";
547 | PRODUCT_NAME = "$(TARGET_NAME)";
548 | SKIP_INSTALL = YES;
549 | };
550 | name = Release;
551 | };
552 | /* End XCBuildConfiguration section */
553 |
554 | /* Begin XCConfigurationList section */
555 | A13F2C6A1484A7BD00F71B2F /* Build configuration list for PBXProject "AppFiguresAPI" */ = {
556 | isa = XCConfigurationList;
557 | buildConfigurations = (
558 | A13F2C7B1484A7BD00F71B2F /* Debug */,
559 | A13F2C7C1484A7BD00F71B2F /* Release */,
560 | );
561 | defaultConfigurationIsVisible = 0;
562 | defaultConfigurationName = Release;
563 | };
564 | A13F2C7D1484A7BD00F71B2F /* Build configuration list for PBXNativeTarget "AppFiguresAPI" */ = {
565 | isa = XCConfigurationList;
566 | buildConfigurations = (
567 | A13F2C7E1484A7BD00F71B2F /* Debug */,
568 | A13F2C7F1484A7BD00F71B2F /* Release */,
569 | );
570 | defaultConfigurationIsVisible = 0;
571 | defaultConfigurationName = Release;
572 | };
573 | /* End XCConfigurationList section */
574 | };
575 | rootObject = A13F2C671484A7BD00F71B2F /* Project object */;
576 | }
577 |
--------------------------------------------------------------------------------