Skip to content
This repository has been archived by the owner on Jul 25, 2023. It is now read-only.

Commit

Permalink
Merge pull request #55 from Taptera/master
Browse files Browse the repository at this point in the history
Minor typo corrections
  • Loading branch information
aclev committed Nov 5, 2015
2 parents 3e78864 + fc4d67e commit 40579c7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
14 changes: 7 additions & 7 deletions OneDriveSDK/Auth/ODBaseAuthProvider.m
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ - (void) authenticateWithViewController:(UIViewController *)viewController compl
success:^(NSURL *endURL, NSError *error){
[self authorizationFlowCompletedWithURL:endURL
error:error
presentingViewControlelr:presentingViewController
presentingViewController:presentingViewController
completion:completionHandler];
}];
}
Expand All @@ -69,10 +69,10 @@ - (void) authenticateWithViewController:(UIViewController *)viewController compl
[[ODAuthenticationViewController alloc] initWithStartURL:[self authURL]
endURL:[NSURL URLWithString:self.serviceInfo.redirectURL]
success:^(NSURL *endURL, NSError *error){
[self authorizationFlowCompletedWithURL:endURL
error:error
presentingViewControlelr:authViewController
completion:completionHandler];
[self authorizationFlowCompletedWithURL:endURL
error:error
presentingViewController:authViewController
completion:completionHandler];

}];
dispatch_async(dispatch_get_main_queue(), ^{
Expand All @@ -91,8 +91,8 @@ - (void) authenticateWithViewController:(UIViewController *)viewController compl

- (void)authorizationFlowCompletedWithURL:(NSURL *)endURL
error:(NSError *)error
presentingViewControlelr:(UIViewController *)presentingViewController
completion:(AuthCompletion)completionHandler
presentingViewController:(UIViewController *)presentingViewController
completion:(AuthCompletion)completionHandler
{
// Always remove the auth view when we finished loading.
dispatch_async(dispatch_get_main_queue(), ^{
Expand Down
14 changes: 6 additions & 8 deletions docs/items.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Delete an Item
---------------
```objc
[[[[odClient drive] items:<item_id>] request] deleteWithCompletion:^(NSError *error){
//Returns an error if there was one.
//Returns an error if there was one.
}];
```
Expand All @@ -57,8 +57,8 @@ More info about collections [here](/docs/collections.md).
```objc
[[[[odClient drive] items:<item_id>] children] getWithCompletion:
^(ODCollection *children, ODChilrenCollectionRequest *nextRequest, NSError *error){
// Returns an ODCollection,
// another children request if there are more children to get,
// Returns an ODCollection,
// another children request if there are more children to get,
// and an error if one occurred.
}];
```
Expand All @@ -69,7 +69,7 @@ Downloading and uploading contents
```objc
ODItemContentRequest *request = [[[odClient drive] items:<item_id>] contentRequest];
[request downloadWithCompletion:^(NSURL *filePath, NSURLResponse *urlResponse, NSError){
[request downloadWithCompletion:^(NSURL *filePath, NSURLResponse *urlResponse, NSError *error){
// The file path to the item on disk. This is a temporary file and will be removed
// after the block is done executing.
}];
Expand All @@ -79,7 +79,7 @@ ODItemContentRequest *request = [[[odClient drive] items:<item_id>] contentReque
}];
[request uploadFromData:<data_object> completion:*(ODItem *item, NSError *error){
// Returns the item that was just uploaded from memory.
// Returns the item that was just uploaded from memory.
}];
```
Expand Down Expand Up @@ -125,12 +125,10 @@ newParent.id = <new_parent_id>;
ODItemCopyRequest *copyRequest = [[[[odClient drive] items:<item_id>] copyWithName:@"new item name" parentReference:newParent] request];

[copyRequest executeWithCompletion:^(ODItem *item, ODAsyncOperationStatus *status, NSError *error){
// This handler will be called whenever there is an update
// This handler will be called whenever there is an update
// from the copy operation, the operation has finished, or there was an error.
// only one of the parameters will be non nil at a time.
}];

```
The executeWithCompletion method returns an ODAsyncURLSessionDataTask, which can be used to monitor the request via the progress property.

0 comments on commit 40579c7

Please sign in to comment.