Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Request get the app name from UGClient

  • Loading branch information...
commit 9b2196e40423e7924b104e909ec423ac5e8c371a 1 parent 60213e0
Ernesto Vargas authored
View
BIN  Messagee.xcodeproj/project.xcworkspace/xcuserdata/ernesto.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown
View
2  Messagee.xcodeproj/xcuserdata/ernesto.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist
@@ -28,7 +28,7 @@
endingColumnNumber = "9223372036854775807"
startingLineNumber = "210"
endingLineNumber = "210"
- landmarkName = "-request:didFailLoadWithError:"
+ landmarkName = "-request::"
landmarkType = "5">
</FileBreakpoint>
</FileBreakpoints>
View
4 Messagee/LoginViewController.m
@@ -16,7 +16,9 @@ @implementation LoginViewController
@synthesize passwordTextField;
- (void)authorizeUser:(NSString *)username withPassword:(NSString *)password {
- [[RKClient sharedClient] get:[NSString stringWithFormat:@"%@/token?grant_type=password&username=%@&password=%@", [[UGClient sharedInstance] usergridApp], username, password] delegate:self];
+ // GET access token from: /<App>/token?grand_type=password&username=<username>&password=<password>
+ [[RKClient sharedClient] get:[NSString stringWithFormat:@"%@/token?grant_type=password&username=%@&password=%@",
+ [[UGClient sharedInstance] usergridApp], username, password] delegate:self];
}
- (IBAction)loginButton:(id)sender {
View
7 Messagee/MessageViewController.m
@@ -28,8 +28,11 @@ - (void)loadMessageBoard {
[[RKObjectManager sharedManager].mappingProvider setMapping:userMapping forKeyPath:@"entities"];
// Request user feed
- // TODO:Change the app name and user form UGclient
- [[RKObjectManager sharedManager] loadObjectsAtResourcePath:@"Messagee/user/netoxico/feed?limit=20" delegate:self];
+ // TODO:Change the app name and user from UGclient
+ [[RKObjectManager sharedManager]
+ loadObjectsAtResourcePath:[NSString stringWithFormat:@"%@/user/netoxico/feed?limit=20",
+ [[UGClient sharedInstance] usergridApp]]
+ delegate:self];
}
View
5 Messagee/NewMessageViewController.m
@@ -80,8 +80,9 @@ - (IBAction)postMessage:(id)sender {
NSString *json = [parser stringFromObject:rpcData error:&error];
if (!error){
- // TODO: change the app name and user must be dynamic from UGClient
- [[[RKClient sharedClient] post:@"/Messagee/user/netoxico/activities/"
+ // POST json message to: /<app_name>/user/<username>/activities/
+ // TODO: change user must be dynamic from UGClient
+ [[[RKClient sharedClient] post:[NSString stringWithFormat:@"/%@/user/netoxico/activities/", [[UGClient sharedInstance] usergridApp]]
params:[RKRequestSerialization serializationWithData:[json dataUsingEncoding:NSUTF8StringEncoding] MIMEType:RKMIMETypeJSON]
delegate:self] send];
}
Please sign in to comment.
Something went wrong with that request. Please try again.