Présentation des APIs Cloud, Identity et Beacon Orange Partner par Renaud Cazoulat le 24 mars 2015.
L'enregistrement est online sur la chaine de la Mobile Banking Factory 2 : https://bitly.com/youtubeMBF2
25. Features
Orange customer data access (read),
App private sub directory (read+write)
Folders listing, creation, deletion
File info, upload, download, deletion, thumbnail
Offline access
More to come in next release
26. Get Authorization Code
In a web browser:
"https://api.orange.com/oauth/v2/authorize?
scope=openid%20cloud
&response_type=code
&client_id=6KRHymujFP8s0Zr6hGHj2k1Ee6a8SG2g
&prompt=login%20consent
&state=upToYouData
&redirect_uri=http%3A%2F%2Fwww.myserver.com"
34. iOS Cloud SDK
// in main controller
- (void)viewDidLoad {
[super viewDidLoad];
// Create the object that will make both user authentication
// and cloud session management
self.cloudSession = [[CloudSession alloc] initWithAppKey:@"yourClientId"
appSecret:@"yourClientSecret"
redirectURI:@"yourURIredirect"];
}
// in app delegate
- (void)applicationDidBecomeActive:(UIApplication *)application {
[self.mainController connect];
}
35. iOS Cloud SDK
// in main controller, how to connect:
- (void) connect {
[self.cloudSession openSessionFrom:self success:^{
[self.cloudSession rootFolderWithSuccess:^(CloudItem * cloudItem) {
[self setViewControllers:@[[[FileListViewController alloc]
initWithSession:self.cloudSession
item:cloudItem]]];
} failure:^(CloudStatus status) {
NSLog (@"Error while getting root folder");
}];
} failure:^(CloudStatus status) {
NSLog (@"Error while connecting user");
}];
}