PageRenderTime 25ms CodeModel.GetById 20ms app.highlight 4ms RepoModel.GetById 0ms app.codeStats 0ms

/FSKit/Source/iPhone/Common/FSKPersonReadRequest.m

http://fskit.googlecode.com/
Objective C | 46 lines | 32 code | 7 blank | 7 comment | 0 complexity | c80ff9b277fba2c0de9a48aad21f4b44 MD5 | raw file
Possible License(s): BSD-3-Clause
 1//
 2//  FSKPersonReadRequest.m
 3//  FSKit
 4//
 5//  Created by Logan Allred on 3/12/08.
 6//  Copyright 2008 RedBugz Software. All rights reserved.
 7//
 8
 9#import "FSKPersonReadRequest.h"
10#import "FSKRequest.h"
11
12@implementation FSKPersonReadRequest
13NSString *kPersonEndpoint = @"person";
14
15-(id)initWithFamilySearchConnection:(FSKConnection *)aFamilySearchConnection 
16						   delegate:(id)aDelegate 
17						   selector:(SEL)aSelector
18{
19	self = [super initWithFamilySearchConnection:aFamilySearchConnection delegate:aDelegate selector:aSelector];
20	return self;
21}											 
22
23+ (void)fetchPersonDataWithIds:(NSSet *)idList 
24			   parameters:(NSDictionary *)parameters 
25			   connection:aFamilySearchConnection 
26				 delegate:(id)aDelegate 
27				 selector:(SEL)aSelector
28{
29	FSKPersonReadRequest *request = [[[self alloc] initWithFamilySearchConnection:aFamilySearchConnection delegate:aDelegate selector:aSelector] autorelease];
30	[request sendPersonReadRequestWithIds:idList parameters:parameters];
31}
32
33- (void)sendPersonReadRequestWithIds:(NSSet *)idList parameters:(NSDictionary *)parameters;
34{
35	[self fetchFamilySearchDataAtEndpoint:@"familytree/v2/person" WithIds:idList parameters:parameters];
36}
37
38- (FSKPersonResponse *)responseWithData:(NSData *)data
39{
40	NSLog(@"%s data:%@", __PRETTY_FUNCTION__, data);	
41	FSKPersonResponse *response = [[FSKPersonResponse alloc] initWithData:data];
42	NSLog(@"response code: %d message: %@", [response statusCode], [response statusMessage]);	
43	return [response autorelease];
44}
45
46@end