Permalink
Browse files

Updated README.md

  • Loading branch information...
1 parent 52dc649 commit 3aed6f2f96e08c3aaee727fa95ff537251cf655d @GreySyntax GreySyntax committed Mar 22, 2011
Showing with 18 additions and 3 deletions.
  1. +18 −3 README.md
View
21 README.md
@@ -6,6 +6,21 @@ How do i use it?
================================
The implementation file is self explanatory. [mGrab error] will contain the last error message, [mGrab url] will return the url of the last upload.
-TODO
-================================
-Implement login, just returns NO for now.
+ mGrab *grab = [[mGrab alloc] initWithEmail:@"testuser@yoursite.com" andPassword:@"password"];
+
+ if (! [grab login])
+ {
+ //Failed to login
+ return NO;
+ }
+
+ NSString *url = [grab upload:@"/Users/somebody/Desktop/NicePicture.png"];
+
+ if (url != nil)
+ {
+ //Sweet everything worked, url returned
+ return url;
+ }
+
+ NSLog(@"mGrab error: %@", [mGrab error]);
+ return @"";

0 comments on commit 3aed6f2

Please sign in to comment.