Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: 2.0
Commits on Dec 19, 2011
  1. Merge branch 'refs/heads/api3-blocks-arc'

    Owain R Hunt authored
    Conflicts:
    	.gitignore
    	AppController.m
    	README.md
    	UAGithubEngine.h
    	UAGithubEngine.m
    	UAGithubEngineDelegate.h
    	UAGithubEngineRequestTypes.h
  2. Ignore xcuserdata.

    Owain R Hunt authored
  3. Handle exceeding rate limit.

    Owain R Hunt authored
    Connection returns NSError with UAGithubAPILimitReached domain.
  4. Remove references to connections array.

    Owain R Hunt authored
    No longer used since the move to blocks.
  5. Add -dealloc to UAReachability.

    Owain R Hunt authored
    reachabilityRef is a CF object and so needs releasing via CFRelease() even though we're under ARC. (Credit Donny Kurniawan).
Commits on Nov 12, 2011
  1. ARCify.

    Owain R Hunt authored
    Converted to ARC using migration tool.
  2. Remove obsolete iVars from UAGithubJSONParser.

    Owain R Hunt authored
  3. Remove NSData from failure block in UAGithubURLConnection.

    Owain R Hunt authored
    Not used, so we only need the error.
  4. Remove initialiser and dealloc from UAGithubJSONParser.

    Owain R Hunt authored
    No longer used as everything is through the class method now.
  5. Implement organisation methods.

    Owain R Hunt authored
    Die a little inside every time I use a 'z' instead of an 's'.
Commits on Nov 9, 2011
  1. Add Organisation methods.

    Owain R Hunt authored
    Methods definitions added to header, stub implementations added to implementation.
  2. Make methods return BOOL where appropriate.

    Owain R Hunt authored
    All methods that should return a BOOL value (e.g. for No Content responses, or where we're checking if a value is true or false) now do so.
Commits on Nov 3, 2011
  1. Make -sendRequest's return type variable.

    Owain R Hunt authored
    Still returns an id, but this can be either an NSArray, an NSNumber with YES or NO for boolean handling, or an NSError.
    - If it's an array, json was received and parsed as expected.
    - If it's an NSNumber YES, that's a successful call to a method that expects a No Content response.
    - If it's an NSNumber NO, that's a successful call to a method that returns an expected 404.
    - If it's an NSError, it's either a connection error, an HTTP error other than the above, or a parser error. NSError instance can be inspected to determine which.
    
    This all enables us to return e.g. a BOOL from a call to UAGE. This is useful in situations where Github will return no data, when calling e.g. -follows:completion:. This can now return a simple YES or NO. Error handling is also significantly improved, in that it now exists.
  2. Rename repositoriescompletion: to repositoriesWithCompletion:

    Owain R Hunt authored
    Missed in the first pass.
  3. Clean up -sendRequest:… error handling.

    Owain R Hunt authored
    Returns error if JSON serialisation fails.
  4. UAGithubURLConnection class method now returns an id.

    Owain R Hunt authored
  5. Clean up UAGithubJSONParser and add error checking.

    Owain R Hunt authored
    Removed old commented-out class method for instantiation. Re-added dateElement handling. Added error handling - +parse:error: now takes a pointer to an error that gets filled if either the JSON deserialization fails or Github returns an error in JSON.
  6. Annotate Followers methods.

    Owain R Hunt authored
    Unclear from method names what's going on. Should rename to make it obvious.
  7. Remove commented-out obsolete API calls.

    Owain R Hunt authored
    Old delete, publicise, privatise repository methods. Now handled elsewhere.
  8. Removed followers method with no corresponding API call.

    Owain R Hunt authored
    Not even sure where - (id)followedBy:(NSString *)user completion:(id(^)(id obj))successBlock_; came from.
  9. Renamed all methods to use 'completion:' instead of 'success:'.

    Owain R Hunt authored
    Callback gets called whether the call succeeds or not, so completion is more semantically accurate.
  10. Filled out Events stub methods.

    Owain R Hunt authored
  11. Temporarily silence 2 warnings for unused variables.

    Owain R Hunt authored
Commits on Nov 1, 2011
  1. Add Events methods.

    Owain R Hunt authored
    Stub methods and request types for new Events API.
Commits on Oct 31, 2011
  1. Remove delegates.

    Owain R Hunt authored
    Now we're using blocks, we can get rid of the delegates we were using previously, namely UAGithubEngineDelegate and UAGithubJSONParserDelegate. Also allows us to shave method names, e.g. + (id)parseJSON:(NSData *)theJSON delegate:(id)theDelegate connectionIdentifier:(NSString *)theIdentifier requestType:(UAGithubRequestType)reqType responseType:(UAGithubResponseType)respType; becomes + (id)parseJSON:(NSData *)theJSON;.
  2. Refactor all engine methods to use blocks.

    Owain R Hunt authored
    All engine methods now return an id instead of an NSString, and all now take a block as their final argument, to be executed when connection and parsing is complete.
  3. Update README.md

    Owain R Hunt authored
  4. Update README.md

    Owain R Hunt authored
  5. Blockify UAGithubEngine.m

    Owain R Hunt authored
    - Engine methods now take an extra parameter: successBlock. This block takes an id and returns an id.
    - -sendRequest:… methods now return an id instead of an NSString. This id is the JSON returned from the API, parsed for ObjC consumption.
    - All calls to -sendRequest:… are wrapped in a call to successBlock().
    - When calling engine methods, we populate the successBlock parameter with what we want to be executed on successful completion of the call.
    - All the above is in place of using delegation. May (should?) eventually lead to the fiery death of UAGithubEngineDelegate.
  6. Class method for JSON parsing.

    Owain R Hunt authored
    UAGithubJSONParser is now interfaced with using a class method that returns the parsed JSON instead of farting around with delegates.
  7. Change asynchronous to synchronous in UAGithubURLConnection.

    Owain R Hunt authored
    Ensure any completion-blocks execute *after* the connection returns instead of trying to do it beforehand.
Commits on Oct 28, 2011
  1. @autorelease.

    Owain R Hunt authored
Commits on Oct 25, 2011
  1. Blockification.

    Owain R Hunt authored
    UAGE now uses blocks throughout the main engine file. URLConnections are fired off using a new class method on UAGithubURLConnection, which takes a success/failure block pair. The success block calls a new class method on UAGithubJSONParser, which also takes a success/failure block pair. All remaining methods that were delegate calls are now called or handled by the core -sendRequest:… method.
Something went wrong with that request. Please try again.