-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added update method on TelepatBaseObjects
- Loading branch information
Ovidiu Nitan
committed
Sep 25, 2015
1 parent
0ae6a0a
commit 37deab5
Showing
9 changed files
with
174 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
-47.9 KB
(50%)
TelepatProject.xcworkspace/xcuserdata/ovidiu.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,17 @@ | |
|
||
#import "ViewController.h" | ||
|
||
@interface Event : TelepatBaseObject | ||
|
||
@property (nonatomic, strong) NSString *text; | ||
@property (nonatomic, strong) NSString *image; | ||
|
||
@end | ||
|
||
@implementation Event | ||
|
||
@end | ||
|
||
@interface ViewController () | ||
|
||
@end | ||
|
@@ -18,18 +29,27 @@ - (void)viewDidLoad { | |
[super viewDidLoad]; | ||
// Do any additional setup after loading the view, typically from a nib. | ||
|
||
// [[Telepat client] adminAdd:@"[email protected]" password:@"abracadabra" name:@"Ovidiu N." withBlock:^(TelepatResponse *response) { | ||
// NSLog(@"add re: %@", response); | ||
// }]; | ||
|
||
// [[Telepat client] adminLogin:@"[email protected]" password:@"abracadabra" withBlock:^(TelepatResponse *response) { | ||
// // [[Telepat client] createAppWithName:@"iOS Test Application" fields:@{@"testdield": @"abcd"} block:^(TelepatResponse *response) { | ||
// // NSLog(@"createAppWithName response: %@", response); | ||
// // }]; | ||
// | ||
// [[Telepat client] listAppsWithBlock:^(TelepatResponse *response) { | ||
// NSLog(@"listAppsWithBlock response: %@", [response getObjectOfType:[TelepatApp class]]); | ||
// Set the API key and the current application ID | ||
// [[Telepat client] setApiKey:@"API_KEY"]; | ||
// [[Telepat client] setAppId:@"APP_ID"]; | ||
// | ||
// [[Telepat client] login:@"[email protected]" password:@"mysecurepassword" withBlock:^(TelepatResponse *response) { | ||
// [[Telepat client] getContextsWithBlock:^(TelepatResponse *response) { | ||
// NSArray *contexts = [response getObjectOfType:[TelepatContext class]]; | ||
// TelepatContext *firstContext = contexts[0]; | ||
// TelepatChannel *firstChannel = [[Telepat client] subscribe:firstContext modelName:@"events" classType:[Event class] withBlock:^(TelepatResponse *response) { | ||
// NSLog(@"Subscribed to %@", firstContext.name); | ||
// }]; | ||
// | ||
// Event *newEvent = [[Event alloc] init]; | ||
// newEvent.text = @"Hello world!"; | ||
// newEvent.image = @"telepat_image.png"; | ||
// | ||
// [firstChannel add:newEvent]; | ||
// | ||
// Event *modifiedEvent = [[Event alloc] initWithDi]; | ||
// }]; | ||
// | ||
// }]; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters