Skip to content

Commit

Permalink
Added remaining parsers for JSON API. Added new check in [NSString da…
Browse files Browse the repository at this point in the history
…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
Show file tree
Hide file tree
Showing 21 changed files with 418 additions and 14 deletions.
10 changes: 9 additions & 1 deletion NSString+UAGithubEngineUtilities.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,19 @@
@implementation NSString(UAGithubEngineUtilities)

- (NSDate *)dateFromGithubDateString {
//return [NSDate dateWithString:[NSString stringWithFormat:@"%@ %@ %@%@%@", [self substringToIndex:10], [self substringWithRange:NSMakeRange(11, 8)], [self substringWithRange:NSMakeRange(19, 1)], [self substringWithRange:NSMakeRange(20, 2)], [self substringFromIndex:23]]];

// Because Github returns two different date string formats throughout the API,
// we need to check how to process the string based on the format used
if ([[self substringWithRange:NSMakeRange(10, 1)] isEqualToString:@"T"])
{
return [NSDate dateWithString:[NSString stringWithFormat:@"%@ %@ %@%@%@", [self substringToIndex:10], [self substringWithRange:NSMakeRange(11, 8)], [self substringWithRange:NSMakeRange(19, 1)], [self substringWithRange:NSMakeRange(20, 2)], [self substringFromIndex:23]]];
}

return [NSDate dateWithString:[self stringByReplacingOccurrencesOfString:@"/" withString:@"-"]];

}


- (NSString *)encodedString
{
return (NSString *)CFURLCreateStringByAddingPercentEscapes(NULL, (CFStringRef)self, NULL, (CFStringRef)@";/?:@&=$+{}<>,", kCFStringEncodingUTF8);
Expand Down
17 changes: 17 additions & 0 deletions UAGithubBlobJSONParser.h
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
28 changes: 28 additions & 0 deletions UAGithubBlobJSONParser.m
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
16 changes: 16 additions & 0 deletions UAGithubCollaboratorsJSONParser.h
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
28 changes: 28 additions & 0 deletions UAGithubCollaboratorsJSONParser.m
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
17 changes: 17 additions & 0 deletions UAGithubCommitsJSONParser.h
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
30 changes: 30 additions & 0 deletions UAGithubCommitsJSONParser.m
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
1 change: 1 addition & 0 deletions UAGithubEngine.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#pragma mark Users

- (void)getUser:(NSString *)user;
- (void)searchUsers:(NSString *)query byEmail:(BOOL)email;


#pragma mark Repositories
Expand Down
33 changes: 30 additions & 3 deletions UAGithubEngine.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,15 @@
#import "UAGithubCollaboratorsParser.h"
#import "UAGithubURLConnection.h"

#import "UAGithubRepositoriesJSONParser.h"
#import "UAGithubUsersJSONParser.h"
#import "UAGithubRepositoriesJSONParser.h"
#import "UAGithubRepositoryLabelsJSONParser.h"
#import "UAGithubCollaboratorsJSONParser.h"
#import "UAGithubCommitsJSONParser.h"
#import "UAGithubIssuesJSONParser.h"
#import "UAGithubIssueLabelsJSONParser.h"
#import "UAGithubIssueCommentsJSONParser.h"
#import "UAGithubBlobJSONParser.h"

#import "CJSONDeserializer.h"

Expand Down Expand Up @@ -121,10 +128,14 @@ - (void)parseDataForConnection:(UAGithubURLConnection *)connection
break;
case UAGithubIssuesResponse:
case UAGithubIssueResponse:
[[UAGithubIssuesJSONParser alloc] initWithJSON:connection.data delegate:self connectionIdentifier:connection.identifier requestType:connection.requestType responseType:connection.responseType];

//[[UAGithubIssuesParser alloc] initWithXML:connection.data delegate:self connectionIdentifier:connection.identifier requestType:connection.requestType responseType:connection.responseType];
break;
case UAGithubCommentsResponse:
case UAGithubCommentResponse:
[[UAGithubIssueCommentsJSONParser alloc] initWithJSON:connection.data delegate:self connectionIdentifier:connection.identifier requestType:connection.requestType responseType:connection.responseType];

//[[UAGithubIssueCommentsParser alloc] initWithXML:connection.data delegate:self connectionIdentifier:connection.identifier requestType:connection.requestType responseType:connection.responseType];
break;
case UAGithubUsersResponse:
Expand All @@ -134,24 +145,33 @@ - (void)parseDataForConnection:(UAGithubURLConnection *)connection
//[[UAGithubUsersParser alloc] initWithXML:connection.data delegate:self connectionIdentifier:connection.identifier requestType:connection.requestType responseType:connection.responseType];
break;
case UAGithubLabelsResponse:
[[UAGithubIssueLabelsJSONParser alloc] initWithJSON:connection.data delegate:self connectionIdentifier:connection.identifier requestType:connection.requestType responseType:connection.responseType];

//[[UAGithubIssueLabelsParser alloc] initWithXML:connection.data delegate:self connectionIdentifier:connection.identifier requestType:connection.requestType responseType:connection.responseType];
break;
case UAGithubRepositoryLabelsResponse:
[[UAGithubRepositoryLabelsJSONParser alloc] initWithJSON:connection.data delegate:self connectionIdentifier:connection.identifier requestType:connection.requestType responseType:connection.responseType];

//[[UAGithubRepositoryLabelsParser alloc] initWithXML:connection.data delegate:self connectionIdentifier:connection.identifier requestType:connection.requestType responseType:connection.responseType];
break;
case UAGithubCommitsResponse:
case UAGithubCommitResponse:
[[UAGithubCommitsJSONParser alloc] initWithJSON:connection.data delegate:self connectionIdentifier:connection.identifier requestType:connection.requestType responseType:connection.responseType];

//[[UAGithubCommitsParser alloc] initWithXML:connection.data delegate:self connectionIdentifier:connection.identifier requestType:connection.requestType responseType:connection.responseType];
break;
case UAGithubBlobsResponse:
break;
case UAGithubBlobResponse:
[[UAGithubBlobJSONParser alloc] initWithJSON:connection.data delegate:self connectionIdentifier:connection.identifier requestType:connection.requestType responseType:connection.responseType];

//[[UAGithubBlobParser alloc] initWithXML:connection.data delegate:self connectionIdentifier:connection.identifier requestType:connection.requestType responseType:connection.responseType];
break;
case UAGithubRawBlobResponse:
[delegate rawBlobReceived:connection.data forConnection:connection.identifier];
break;
case UAGithubCollaboratorsResponse:
[[UAGithubCollaboratorsJSONParser alloc] initWithJSON:connection.data delegate:self connectionIdentifier:connection.identifier requestType:connection.requestType responseType:connection.responseType];

//[[UAGithubCollaboratorsParser alloc] initWithXML:connection.data delegate:self connectionIdentifier:connection.identifier requestType:connection.requestType responseType:connection.responseType];
break;
default:
Expand Down Expand Up @@ -203,7 +223,7 @@ - (void)parsingSucceededForConnection:(NSString *)connectionIdentifier ofRespons
default:
break;
}
//[NSApp terminate:self];
[NSApp terminate:self];


}
Expand Down Expand Up @@ -510,6 +530,13 @@ - (void)getUser:(NSString *)user
}


- (void)searchUsers:(NSString *)query byEmail:(BOOL)email
{
[self sendRequest:[NSString stringWithFormat:@"user/%@/%@", email ? @"email" : @"search", query] requestType:UAGithubUserRequest responseType:UAGithubUsersResponse withParameters:nil];

}


#pragma mark Commits

- (void)getCommitsForBranch:(NSString *)branchPath
Expand Down
46 changes: 44 additions & 2 deletions UAGithubEngine.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@
6879ABB011FF40E800F29BDE /* UAGithubRepositoriesJSONParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 6879ABAF11FF40E800F29BDE /* UAGithubRepositoriesJSONParser.m */; };
6879AC0111FF43DA00F29BDE /* NSArray+Utilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 6879AC0011FF43DA00F29BDE /* NSArray+Utilities.m */; };
68813F3D11889CB100F1FF7C /* UAGithubRepositoryLabelsParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 68813F3C11889CB100F1FF7C /* UAGithubRepositoryLabelsParser.m */; };
688ECC4F1200A7390087ADB3 /* UAGithubCollaboratorsJSONParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 688ECC4E1200A7390087ADB3 /* UAGithubCollaboratorsJSONParser.m */; };
688ECC8F1200A9240087ADB3 /* UAGithubIssuesJSONParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 688ECC8E1200A9240087ADB3 /* UAGithubIssuesJSONParser.m */; };
688ECC921200A9350087ADB3 /* UAGithubIssueCommentsJSONParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 688ECC911200A9350087ADB3 /* UAGithubIssueCommentsJSONParser.m */; };
688ECC951200A9480087ADB3 /* UAGithubIssueLabelsJSONParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 688ECC941200A9480087ADB3 /* UAGithubIssueLabelsJSONParser.m */; };
688ECC981200A9580087ADB3 /* UAGithubRepositoryLabelsJSONParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 688ECC971200A9580087ADB3 /* UAGithubRepositoryLabelsJSONParser.m */; };
688ECC9B1200A96D0087ADB3 /* UAGithubCommitsJSONParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 688ECC9A1200A96D0087ADB3 /* UAGithubCommitsJSONParser.m */; };
688ECC9E1200A9870087ADB3 /* UAGithubBlobJSONParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 688ECC9D1200A9870087ADB3 /* UAGithubBlobJSONParser.m */; };
68AEDF28116E46B20018E490 /* NSString+UAGithubEngineUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 68AEDF27116E46B20018E490 /* NSString+UAGithubEngineUtilities.m */; };
68B7FED01189DFC60058EE3B /* UAGithubBlobParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 68B7FECF1189DFC60058EE3B /* UAGithubBlobParser.m */; };
68B7FF3A1189FDE60058EE3B /* UAGithubCollaboratorsParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 68B7FF391189FDE60058EE3B /* UAGithubCollaboratorsParser.m */; };
Expand Down Expand Up @@ -90,6 +97,20 @@
6879AC0011FF43DA00F29BDE /* NSArray+Utilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSArray+Utilities.m"; sourceTree = "<group>"; };
68813F3B11889CB100F1FF7C /* UAGithubRepositoryLabelsParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UAGithubRepositoryLabelsParser.h; sourceTree = "<group>"; };
68813F3C11889CB100F1FF7C /* UAGithubRepositoryLabelsParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UAGithubRepositoryLabelsParser.m; sourceTree = "<group>"; };
688ECC4D1200A7390087ADB3 /* UAGithubCollaboratorsJSONParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UAGithubCollaboratorsJSONParser.h; sourceTree = "<group>"; };
688ECC4E1200A7390087ADB3 /* UAGithubCollaboratorsJSONParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UAGithubCollaboratorsJSONParser.m; sourceTree = "<group>"; };
688ECC8D1200A9240087ADB3 /* UAGithubIssuesJSONParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UAGithubIssuesJSONParser.h; sourceTree = "<group>"; };
688ECC8E1200A9240087ADB3 /* UAGithubIssuesJSONParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UAGithubIssuesJSONParser.m; sourceTree = "<group>"; };
688ECC901200A9350087ADB3 /* UAGithubIssueCommentsJSONParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UAGithubIssueCommentsJSONParser.h; sourceTree = "<group>"; };
688ECC911200A9350087ADB3 /* UAGithubIssueCommentsJSONParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UAGithubIssueCommentsJSONParser.m; sourceTree = "<group>"; };
688ECC931200A9480087ADB3 /* UAGithubIssueLabelsJSONParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UAGithubIssueLabelsJSONParser.h; sourceTree = "<group>"; };
688ECC941200A9480087ADB3 /* UAGithubIssueLabelsJSONParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UAGithubIssueLabelsJSONParser.m; sourceTree = "<group>"; };
688ECC961200A9580087ADB3 /* UAGithubRepositoryLabelsJSONParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UAGithubRepositoryLabelsJSONParser.h; sourceTree = "<group>"; };
688ECC971200A9580087ADB3 /* UAGithubRepositoryLabelsJSONParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UAGithubRepositoryLabelsJSONParser.m; sourceTree = "<group>"; };
688ECC991200A96D0087ADB3 /* UAGithubCommitsJSONParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UAGithubCommitsJSONParser.h; sourceTree = "<group>"; };
688ECC9A1200A96D0087ADB3 /* UAGithubCommitsJSONParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UAGithubCommitsJSONParser.m; sourceTree = "<group>"; };
688ECC9C1200A9870087ADB3 /* UAGithubBlobJSONParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UAGithubBlobJSONParser.h; sourceTree = "<group>"; };
688ECC9D1200A9870087ADB3 /* UAGithubBlobJSONParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UAGithubBlobJSONParser.m; sourceTree = "<group>"; };
68AEDF26116E46B20018E490 /* NSString+UAGithubEngineUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+UAGithubEngineUtilities.h"; sourceTree = "<group>"; };
68AEDF27116E46B20018E490 /* NSString+UAGithubEngineUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+UAGithubEngineUtilities.m"; sourceTree = "<group>"; };
68B7FECE1189DFC60058EE3B /* UAGithubBlobParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UAGithubBlobParser.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -267,10 +288,24 @@
children = (
6879AB6411FF0FAA00F29BDE /* UAGithubJSONParser.h */,
6879AB6511FF0FAA00F29BDE /* UAGithubJSONParser.m */,
6879ABAE11FF40E800F29BDE /* UAGithubRepositoriesJSONParser.h */,
6879ABAF11FF40E800F29BDE /* UAGithubRepositoriesJSONParser.m */,
6879AB6B11FF145200F29BDE /* UAGithubUsersJSONParser.h */,
6879AB6C11FF145200F29BDE /* UAGithubUsersJSONParser.m */,
6879ABAE11FF40E800F29BDE /* UAGithubRepositoriesJSONParser.h */,
6879ABAF11FF40E800F29BDE /* UAGithubRepositoriesJSONParser.m */,
688ECC961200A9580087ADB3 /* UAGithubRepositoryLabelsJSONParser.h */,
688ECC971200A9580087ADB3 /* UAGithubRepositoryLabelsJSONParser.m */,
688ECC4D1200A7390087ADB3 /* UAGithubCollaboratorsJSONParser.h */,
688ECC4E1200A7390087ADB3 /* UAGithubCollaboratorsJSONParser.m */,
688ECC991200A96D0087ADB3 /* UAGithubCommitsJSONParser.h */,
688ECC9A1200A96D0087ADB3 /* UAGithubCommitsJSONParser.m */,
688ECC8D1200A9240087ADB3 /* UAGithubIssuesJSONParser.h */,
688ECC8E1200A9240087ADB3 /* UAGithubIssuesJSONParser.m */,
688ECC931200A9480087ADB3 /* UAGithubIssueLabelsJSONParser.h */,
688ECC941200A9480087ADB3 /* UAGithubIssueLabelsJSONParser.m */,
688ECC901200A9350087ADB3 /* UAGithubIssueCommentsJSONParser.h */,
688ECC911200A9350087ADB3 /* UAGithubIssueCommentsJSONParser.m */,
688ECC9C1200A9870087ADB3 /* UAGithubBlobJSONParser.h */,
688ECC9D1200A9870087ADB3 /* UAGithubBlobJSONParser.m */,
);
name = "JSON Parsers";
sourceTree = "<group>";
Expand Down Expand Up @@ -432,6 +467,13 @@
6879AB6D11FF145200F29BDE /* UAGithubUsersJSONParser.m in Sources */,
6879ABB011FF40E800F29BDE /* UAGithubRepositoriesJSONParser.m in Sources */,
6879AC0111FF43DA00F29BDE /* NSArray+Utilities.m in Sources */,
688ECC4F1200A7390087ADB3 /* UAGithubCollaboratorsJSONParser.m in Sources */,
688ECC8F1200A9240087ADB3 /* UAGithubIssuesJSONParser.m in Sources */,
688ECC921200A9350087ADB3 /* UAGithubIssueCommentsJSONParser.m in Sources */,
688ECC951200A9480087ADB3 /* UAGithubIssueLabelsJSONParser.m in Sources */,
688ECC981200A9580087ADB3 /* UAGithubRepositoryLabelsJSONParser.m in Sources */,
688ECC9B1200A96D0087ADB3 /* UAGithubCommitsJSONParser.m in Sources */,
688ECC9E1200A9870087ADB3 /* UAGithubBlobJSONParser.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
17 changes: 17 additions & 0 deletions UAGithubIssueCommentsJSONParser.h
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
28 changes: 28 additions & 0 deletions UAGithubIssueCommentsJSONParser.m
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
Loading

0 comments on commit d94fadd

Please sign in to comment.