Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update readme for clarity.

  • Loading branch information...
commit 1dcd5fed18b0f3b2ff0b977a08a1e2f9acadfd8d 1 parent 6944a29
Owain R Hunt authored
Showing with 11 additions and 17 deletions.
  1. +11 −17 README.md
View
28 README.md
@@ -19,33 +19,27 @@ The `master` branch is built on version 3 of the API, and uses up-to-date techno
* The easiest way to use the engine is with the framework - build and link against the `UAGithubEngine` framework, and `#import <UAGithubEngine/UAGithubEngine.h>` where you want to use the framework.
-* If you don't fancy using CocoaPods or the framework, copy across all the files in the 'UAGithubEngine' group from the UAGithubEngine project into your app's project and `#import "UAGithubEngine.h"` where you want to use the engine.
+* If you don't fancy using CocoaPods or the framework, either copy across all the files in the 'UAGithubEngine' group from the UAGithubEngine project into your app's project, or add the entire project to your workspace. Use `#import "UAGithubEngine.h"` where you want to use the engine.
-* Note that UAGE has undergone a complete rewrite from version 1 to version 2. It now longer uses delegates, and instead relies on a block and callback structure.
-
-* Instantiate an engine, passing a username and password. If you want to receive notifications when reachability status changes (`UAGithubReachabilityStatusDidChangeNotification`), pass `YES` as the final argument. For example:
-
- `UAGithubEngine *engine = [[UAGithubEngine alloc] initWithUsername:@"aUser" password:@"aPassword" withReachability:YES];`
+* Instantiate an engine, passing a username and password. If you want to receive notifications when reachability status changes (`UAGithubReachabilityStatusDidChangeNotification`), pass `YES` as the final argument.
* Call some methods.
-## Examples
+## Code speaks louder than words.
```objective-c
-[engine repositoriesWithSuccess:^(id response){
+UAGithubEngine *engine = [[UAGithubEngine alloc] initWithUsername:@"aUser" password:@"aPassword" withReachability:YES];
+
+[engine repositoriesWithSuccess:^(id response) {
NSLog(@"Got an array of repos: %@", obj);
} failure:^(NSError *error) {
- NSLog(@"Crapsticks: %@", error);
+ NSLog(@"Oops: %@", error);
}];
-[engine user:@"this_guy" isCollaboratorForRepository:@"UAGithubEngine" success:^(BOOL hotOrNot) {
- NSLog(@"%d", hotOrNot);
+[engine user:@"this_guy" isCollaboratorForRepository:@"UAGithubEngine" success:^(BOOL collaborates) {
+ NSLog(@"%d", collaborates);
} failure:^(NSError *error){
- NSLog(@"Monkey balls: %@", error);
+ NSLog(@"D'oh: %@", error);
}];
```
-Any questions, comments, improvements and so on, you can find me on Twitter (@orhunt) or send me an email (owain@underscoreapps.com).
-
-### Acknowledgements
-The original UAGithubEngine was heavily based on the structure (and in some places the code) of Matt Gemmell's MGTwitterEngine.
-Now that `NSJSONSerialization` is available in OS X and iOS, UAGithubEngine no longer uses Jonathan Wight's TouchJSON parser.
Please sign in to comment.
Something went wrong with that request. Please try again.