Permalink
Browse files

Initial import

  • Loading branch information...
0 parents commit 539c927aa9ce992eb33d98167927500f8439987b @soffes soffes committed Jul 25, 2012
@@ -0,0 +1,8 @@
+.DS_Store
+*xcuserdata/
+*build/
+*.mode1v3
+*.pbxuser
+*.xcworkspace
+*.moved-aside/
+DerivedData

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,54 @@
+//
+// CDKDefines.h
+// CheddarKit
+//
+// Created by Sam Soffes on 3/30/12.
+// Copyright (c) 2012 Nothing Magical. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#ifndef CHDEFINES
+#define CHDEFINES
+
+// CDKDispatchRelease
+#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 60000 || MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
+ #define CDKDispatchRelease(queue)
+#else
+ #define CDKDispatchRelease(queue) dispatch_release(queue)
+#endif
+
+// Always use development on the simulator or Mac app (for now)
+#define IN_PRODUCTION !TARGET_IPHONE_SIMULATOR && !TARGET_OS_MAC
+
+#pragma mark - API
+
+extern NSString *const kCDKAPIScheme;
+extern NSString *const kCDKAPIHost;
+extern NSString *const kCDKPusherAPIKey;
+
+
+#pragma mark - User Defaults Keys
+
+extern NSString *const kCDKCurrentUserIDKey;
+extern NSString *const kCDKCurrentUsernameKey;
+
+
+#pragma mark - Fonts
+
+extern NSString *const kCDKRegularFontName;
+extern NSString *const kCDKBoldFontName;
+extern NSString *const kCDKBoldItalicFontName;
+extern NSString *const kCDKItalicFontName;
+
+
+#pragma mark - Misc
+
+extern NSString *const kCDKKeychainServiceName;
+
+#pragma mark - Notifications
+
+extern NSString *const kCDKListDidUpdateNotificationName;
+extern NSString *const kCDKPlusDidChangeNotificationName;
+
+#endif
@@ -0,0 +1,46 @@
+//
+// CDKDefines.m
+// CheddarKit
+//
+// Created by Sam Soffes on 3/30/12.
+// Copyright (c) 2012 Nothing Magical. All rights reserved.
+//
+
+#import "CDKDefines.h"
+
+#pragma mark - API
+
+#if IN_PRODUCTION
+NSString *const kCDKAPIScheme = @"https";
+NSString *const kCDKAPIHost = @"api.cheddarapp.com";
+NSString *const kCDKPusherAPIKey = @"675f10a650f18b4eb0a8";
+#else
+NSString *const kCDKAPIScheme = @"http";
+NSString *const kCDKAPIHost = @"localhost:5000";
+NSString *const kCDKPusherAPIKey = @"a02cb793e9d5fb919023";
+#endif
+
+
+#pragma mark - User Defaults Keys
+
+NSString *const kCDKCurrentUserIDKey = @"CHCurrentUserID";
+NSString *const kCDKCurrentUsernameKey = @"CHCurrentUsername";
+
+
+#pragma mark - Fonts
+
+NSString *const kCDKRegularFontName = @"Gotham-Book";
+NSString *const kCDKBoldFontName = @"Gotham-Bold";
+NSString *const kCDKBoldItalicFontName = @"Gotham-BoldItalic";
+NSString *const kCDKItalicFontName = @"Gotham-BookItalic";
+
+
+#pragma mark - Misc
+
+NSString *const kCDKKeychainServiceName = @"Cheddar";
+
+
+#pragma mark - Notifications
+
+NSString *const kCDKListDidUpdateNotificationName = @"CHListDidUpdateNotification";
+NSString *const kCDKPlusDidChangeNotificationName = @"CHPlusDidChangeNotification";
@@ -0,0 +1,45 @@
+//
+// CDKHTTPClient.h
+// CheddarKit
+//
+// Created by Sam Soffes on 3/30/12.
+// Copyright (c) 2012 Nothing Magical. All rights reserved.
+//
+
+#import "AFNetworking.h"
+
+typedef void (^CDKHTTPClientSuccess)(AFJSONRequestOperation *operation, id responseObject);
+typedef void (^CDKHTTPClientFailure)(AFJSONRequestOperation *operation, NSError *error);
+
+@class CDKUser;
+@class CDKList;
+@class CDKTask;
+@class BLYChannel;
+
+@interface CDKHTTPClient : AFHTTPClient
+
++ (CDKHTTPClient *)sharedClient;
+- (void)setClientID:(NSString *)clientID secret:(NSString *)clientSecret;
+
+- (void)changeUser:(CDKUser *)user;
+
+// User
+- (void)signInWithLogin:(NSString *)login password:(NSString *)password success:(CDKHTTPClientSuccess)success failure:(CDKHTTPClientFailure)failure;
+- (void)signUpWithUsername:(NSString *)username email:(NSString *)email password:(NSString *)password success:(CDKHTTPClientSuccess)success failure:(CDKHTTPClientFailure)failure;
+- (void)updateCurrentUserWithSuccess:(CDKHTTPClientSuccess)success failure:(CDKHTTPClientFailure)failure;
+
+// Lists
+- (void)getListsWithSuccess:(CDKHTTPClientSuccess)success failure:(CDKHTTPClientFailure)failure;
+- (void)createList:(CDKList *)list success:(CDKHTTPClientSuccess)success failure:(CDKHTTPClientFailure)failure;
+- (void)updateList:(CDKList *)list success:(CDKHTTPClientSuccess)success failure:(CDKHTTPClientFailure)failure;
+- (void)sortLists:(NSArray *)lists success:(CDKHTTPClientSuccess)success failure:(CDKHTTPClientFailure)failure;
+
+// Tasks
+- (void)getTasksWithList:(CDKList *)list success:(CDKHTTPClientSuccess)success failure:(CDKHTTPClientFailure)failure;
+- (void)createTask:(CDKTask *)task success:(CDKHTTPClientSuccess)success failure:(CDKHTTPClientFailure)failure;
+- (void)updateTask:(CDKTask *)task success:(CDKHTTPClientSuccess)success failure:(CDKHTTPClientFailure)failure;
+- (void)sortTasks:(NSArray *)tasks inList:(CDKList *)list success:(CDKHTTPClientSuccess)success failure:(CDKHTTPClientFailure)failure;
+- (void)archiveAllTasksInList:(CDKList *)list success:(CDKHTTPClientSuccess)success failure:(CDKHTTPClientFailure)failure;
+- (void)archiveCompletedTasksInList:(CDKList *)list success:(CDKHTTPClientSuccess)success failure:(CDKHTTPClientFailure)failure;
+
+@end
Oops, something went wrong.

0 comments on commit 539c927

Please sign in to comment.