forked from owainhunt/UAGithubEngine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added remaining parsers for JSON API. Added new check in [NSString da…
…teFromGithubDateString] that deals with two of the three different date formats in API responses. Parser base class now checks for an 'error' key in responses, calling [delegate parsingFailed...] with the error if found. Added user searching by username or email address.
- Loading branch information
Owain R Hunt
committed
Jul 28, 2010
1 parent
cfab3eb
commit d94fadd
Showing
21 changed files
with
418 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// | ||
// UAGithubBlobJSONParser.h | ||
// UAGithubEngine | ||
// | ||
// Created by Owain Hunt on 28/07/2010. | ||
// Copyright 2010 Owain R Hunt. All rights reserved. | ||
// | ||
|
||
#import <Cocoa/Cocoa.h> | ||
#import "UAGithubJSONParser.h" | ||
|
||
|
||
@interface UAGithubBlobJSONParser : UAGithubJSONParser { | ||
|
||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// | ||
// UAGithubBlobJSONParser.m | ||
// UAGithubEngine | ||
// | ||
// Created by Owain Hunt on 28/07/2010. | ||
// Copyright 2010 Owain R Hunt. All rights reserved. | ||
// | ||
|
||
#import "UAGithubBlobJSONParser.h" | ||
|
||
|
||
@implementation UAGithubBlobJSONParser | ||
|
||
- (id)initWithJSON:(NSData *)theJSON delegate:(id)theDelegate connectionIdentifier:(NSString *)theIdentifier requestType:(UAGithubRequestType)reqType responseType:(UAGithubResponseType)respType | ||
{ | ||
|
||
if (self = [super initWithJSON:theJSON delegate:theDelegate connectionIdentifier:theIdentifier requestType:reqType responseType:respType]) | ||
{ | ||
|
||
} | ||
|
||
[self parse]; | ||
|
||
return self; | ||
} | ||
|
||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// | ||
// UAGithubCollaboratorsJSONParser.h | ||
// UAGithubEngine | ||
// | ||
// Created by Owain Hunt on 28/07/2010. | ||
// Copyright 2010 Owain R Hunt. All rights reserved. | ||
// | ||
|
||
#import <Cocoa/Cocoa.h> | ||
#import "UAGithubJSONParser.h" | ||
|
||
@interface UAGithubCollaboratorsJSONParser : UAGithubJSONParser { | ||
|
||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// | ||
// UAGithubCollaboratorsJSONParser.m | ||
// UAGithubEngine | ||
// | ||
// Created by Owain Hunt on 28/07/2010. | ||
// Copyright 2010 Owain R Hunt. All rights reserved. | ||
// | ||
|
||
#import "UAGithubCollaboratorsJSONParser.h" | ||
|
||
|
||
@implementation UAGithubCollaboratorsJSONParser | ||
|
||
- (id)initWithJSON:(NSData *)theJSON delegate:(id)theDelegate connectionIdentifier:(NSString *)theIdentifier requestType:(UAGithubRequestType)reqType responseType:(UAGithubResponseType)respType | ||
{ | ||
|
||
if (self = [super initWithJSON:theJSON delegate:theDelegate connectionIdentifier:theIdentifier requestType:reqType responseType:respType]) | ||
{ | ||
|
||
} | ||
|
||
[self parse]; | ||
|
||
return self; | ||
} | ||
|
||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// | ||
// UAGithubCommitsJSONParser.h | ||
// UAGithubEngine | ||
// | ||
// Created by Owain Hunt on 28/07/2010. | ||
// Copyright 2010 Owain R Hunt. All rights reserved. | ||
// | ||
|
||
#import <Cocoa/Cocoa.h> | ||
#import "UAGithubJSONParser.h" | ||
|
||
|
||
@interface UAGithubCommitsJSONParser : UAGithubJSONParser { | ||
|
||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// | ||
// UAGithubCommitsJSONParser.m | ||
// UAGithubEngine | ||
// | ||
// Created by Owain Hunt on 28/07/2010. | ||
// Copyright 2010 Owain R Hunt. All rights reserved. | ||
// | ||
|
||
#import "UAGithubCommitsJSONParser.h" | ||
|
||
|
||
@implementation UAGithubCommitsJSONParser | ||
|
||
- (id)initWithJSON:(NSData *)theJSON delegate:(id)theDelegate connectionIdentifier:(NSString *)theIdentifier requestType:(UAGithubRequestType)reqType responseType:(UAGithubResponseType)respType | ||
{ | ||
|
||
if (self = [super initWithJSON:theJSON delegate:theDelegate connectionIdentifier:theIdentifier requestType:reqType responseType:respType]) | ||
{ | ||
dateElements = [NSArray arrayWithObjects:@"committed_date", @"authored_date", nil]; | ||
dictionaryElements = [NSArray arrayWithObjects:@"parent", @"author", @"committer", nil]; | ||
arrayElements = [NSArray arrayWithObjects:@"parents", nil]; | ||
} | ||
|
||
[self parse]; | ||
|
||
return self; | ||
} | ||
|
||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// | ||
// UAGithubIssueCommentsJSONParser.h | ||
// UAGithubEngine | ||
// | ||
// Created by Owain Hunt on 28/07/2010. | ||
// Copyright 2010 Owain R Hunt. All rights reserved. | ||
// | ||
|
||
#import <Cocoa/Cocoa.h> | ||
#import "UAGithubJSONParser.h" | ||
|
||
|
||
@interface UAGithubIssueCommentsJSONParser : UAGithubJSONParser { | ||
|
||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// | ||
// UAGithubIssueCommentsJSONParser.m | ||
// UAGithubEngine | ||
// | ||
// Created by Owain Hunt on 28/07/2010. | ||
// Copyright 2010 Owain R Hunt. All rights reserved. | ||
// | ||
|
||
#import "UAGithubIssueCommentsJSONParser.h" | ||
|
||
|
||
@implementation UAGithubIssueCommentsJSONParser | ||
|
||
- (id)initWithJSON:(NSData *)theJSON delegate:(id)theDelegate connectionIdentifier:(NSString *)theIdentifier requestType:(UAGithubRequestType)reqType responseType:(UAGithubResponseType)respType | ||
{ | ||
|
||
if (self = [super initWithJSON:theJSON delegate:theDelegate connectionIdentifier:theIdentifier requestType:reqType responseType:respType]) | ||
{ | ||
dateElements = [NSArray arrayWithObjects:@"created_at", @"updated_at", nil]; | ||
} | ||
|
||
[self parse]; | ||
|
||
return self; | ||
} | ||
|
||
|
||
@end |
Oops, something went wrong.