Permalink
Browse files

restfulie design refactoring: registers and less decoupled media type…

…s and marshallers
  • Loading branch information...
1 parent fe34c72 commit 8600688d038354ca24b68e88b7855d3bcf2af6d2 @bfuster bfuster committed Jan 4, 2011
View
4 Classes/Resource.h
@@ -1,6 +1,6 @@
/*
* Resource.h
- * restfulie-objc
+ * restfulie-objectivec
*
* Created by Bruno Fuster on 10/22/10.
*
@@ -32,6 +32,6 @@
- (id) initWithData:(id)data ofType:(Class)clazz;
- (id) initWithArray:(NSArray *)array ofType:(Class)clazz;
- (id) createObjWithDictionary:(NSDictionary *)dictionary ofType:(Class)clazz;
-- (id) getData;
+- (void) removeUnavailableKeys:(NSMutableDictionary*)dictionary comparedToObject:(id)obj;
@end
View
21 Classes/Resource.m
@@ -1,6 +1,6 @@
/*
* Resource.m
- * restfulie-objc
+ * restfulie-objectivec
*
* Created by Bruno Fuster on 10/22/10.
*
@@ -44,11 +44,7 @@ - (id) createObjWithDictionary:(NSDictionary *)dictionary ofType:(Class)clazz {
id obj = [[clazz alloc] init];
- /* CHECK FOR ID KEYS */
-
- for (NSString *key in [mutableDict allKeys])
- if (![obj respondsToSelector:NSSelectorFromString(key)])
- [mutableDict removeObjectForKey:key];
+ [self removeUnavailableKeys:mutableDict comparedToObject:obj];
/* PREPARE DICT */
@@ -74,6 +70,15 @@ - (id) createObjWithDictionary:(NSDictionary *)dictionary ofType:(Class)clazz {
return obj;
}
+- (void) removeUnavailableKeys:(NSMutableDictionary*)dictionary comparedToObject:(id)obj {
+
+ for (NSString *key in [dictionary allKeys])
+ if (![obj respondsToSelector:NSSelectorFromString(key)])
+ [dictionary removeObjectForKey:key];
+
+}
+
+
- (id) initWithArray:(NSArray *)array ofType:(Class)clazz {
NSMutableArray *objsArray = [[NSMutableArray alloc] init];
@@ -84,8 +89,4 @@ - (id) initWithArray:(NSArray *)array ofType:(Class)clazz {
return objsArray;
}
-- (id) getData {
-
-}
-
@end
View
12 Classes/Response.h
@@ -1,6 +1,6 @@
/*
* Response.h
- * restfulie-objc
+ * restfulie-objectivec
*
* Created by Bruno Fuster on 10/22/10.
*
@@ -22,22 +22,22 @@
#import <Foundation/Foundation.h>
#import "Resource.h";
+#import "RestClient.h"
@interface Response : NSObject {
id data;
- Class type;
+ id<RestClient> client;
NSNumber *code;
}
@property (nonatomic, retain) id data;
-@property (nonatomic, assign) Class type;
+@property (nonatomic, retain) id<RestClient> client;
@property (nonatomic, retain) NSNumber *code;
-+(Response *) initWithData:(id)data;
-
--(id) resourceWithClass:(Class)clazz;
++(Response *) initWithData:(id)data andClient:(id<RestClient>)client;
+-(id) resource;
@end
View
21 Classes/Response.m
@@ -1,6 +1,6 @@
/*
* Response.m
- * restfulie-objc
+ * restfulie-objectivec
*
* Created by Bruno Fuster on 10/22/10.
*
@@ -24,28 +24,21 @@
@implementation Response
-@synthesize data, type, code;
+@synthesize data, code, client;
-+(Response *) initWithData:(NSDictionary *)data
++(Response *) initWithData:(id)data andClient:(id<RestClient>)client
{
Response *res = [[Response alloc] init];
[res setData:data];
+ [res setClient:client];
return res;
}
-- (id) resourceWithClass:(Class)clazz
-{
+-(id) resource {
- Resource *resource = [[Resource alloc] initWithData:self.data ofType:clazz];
- //TODO create a real wrapper for a Resource!
- return resource;
-}
-
-- (id) deserialize
-{
- NSLog(@"data %@", self.data);
- return nil;
+ id<MediaType> mediaType = [client currentMediaType];
+ return [mediaType unmarshall:self.data forClient:self.client];
}
- (void) dealloc
View
16 Classes/serialize/Unmarshaller.m → Classes/RestClient.h 100755 → 100644
@@ -1,8 +1,8 @@
/*
- * Unmarshaller.m
- * restfulie-objc
+ * RestClient.h
+ * restfulie-objectivec
*
- * Created by Bruno Fuster on 10/22/10.
+ * Created by Bruno Fuster on 1/3/11.
*
* Copyright (c) 2009 Caelum - www.caelum.com.br/opensource
* All rights reserved.
@@ -20,9 +20,11 @@
* limitations under the License.
*/
-#import "Unmarshaller.h"
-
-
-@implementation Unmarshaller
+#import <Foundation/Foundation.h>
+#import "MediaType.h"
+@protocol RestClient
+-(id) at:(NSString *)uri;
+-(NSArray*)mediaTypes;
+-(id<MediaType>)currentMediaType;
@end
View
7 Classes/Restfulie.h
@@ -1,6 +1,6 @@
/*
* Restfulie.h
- * restfulie-objc
+ * restfulie-objectivec
*
* Created by Bruno Fuster on 10/22/10.
*
@@ -22,12 +22,13 @@
#import <Foundation/Foundation.h>
#import "Request.h"
-
+#import "DefaultRestClient.h"
@interface Restfulie : NSObject {
}
-+(Request*) at:(NSString *) url;
++(id) at:(NSString *) uri;
++(id) customWithTypes:(NSArray*)types andCollectionNames:(NSArray*)names;
@end
View
22 Classes/Restfulie.m
@@ -1,6 +1,6 @@
/*
* Restfulie.m
- * restfulie-objc
+ * restfulie-objectivec
*
* Created by Bruno Fuster on 10/22/10.
*
@@ -21,14 +21,28 @@
*/
#import "Restfulie.h"
+#import "DefaultRestClient.h"
+#import "JsonMediaType.h"
#import "Request.h"
-
@implementation Restfulie
-+ (Request *) at:(NSString *) url
++(DefaultRestClient*)customWithTypes:(NSArray*)types andCollectionNames:(NSArray*)names {
+
+ DefaultRestClient *client = [[DefaultRestClient alloc] init];
+
+ JsonMediaType *jsonMediaType = [[JsonMediaType alloc] init];
+ [jsonMediaType withTypes:types andCollectionNames:names];
+
+ [client setMediaTypes:[NSArray arrayWithObjects:jsonMediaType, nil]];
+ [jsonMediaType release];
+
+ return client;
+}
+
++ (Request *) at:(NSString *) uri
{
- return [Request initWithURI:url];
+ return [Request requestWithURI:uri];
}
@end
View
35 Classes/http/DefaultRestClient.h
@@ -0,0 +1,35 @@
+/*
+ * DefaultRestClient.h
+ * restfulie-objectivec
+ *
+ * Created by Bruno Fuster on 1/3/11.
+ *
+ * Copyright (c) 2009 Caelum - www.caelum.com.br/opensource
+ * All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#import <Foundation/Foundation.h>
+#import "Restfulie.h"
+#import "MediaType.h"
+#import "RestClient.h"
+
+@interface DefaultRestClient : NSObject<RestClient> {
+
+ NSArray<MediaType> *mediaTypes;
+}
+
+@property (nonatomic, retain) NSArray<MediaType> *mediaTypes;
+
+@end
View
40 Classes/http/DefaultRestClient.m
@@ -0,0 +1,40 @@
+/*
+ * DefaultRestClient.m
+ * restfulie-objectivec
+ *
+ * Created by Bruno Fuster on 1/3/11.
+ *
+ * Copyright (c) 2009 Caelum - www.caelum.com.br/opensource
+ * All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#import "DefaultRestClient.h"
+
+
+@implementation DefaultRestClient
+
+@synthesize mediaTypes;
+
+-(Request*) at:(NSString *)uri {
+
+ return [Request requestWithURI:uri andClient:self];
+}
+
+-(id<MediaType>)currentMediaType {
+
+ return [self.mediaTypes objectAtIndex:0];
+}
+
+@end
View
12 Classes/http/Request.h
@@ -1,6 +1,6 @@
/*
* Request.h
- * restfulie-objc
+ * restfulie-objectivec
*
* Created by Bruno Fuster on 10/22/10.
*
@@ -22,17 +22,23 @@
#import <Foundation/Foundation.h>
#import "Response.h"
+#import "MediaType.h"
+#import "JsonMediaType.h"
@interface Request : NSObject {
NSURL *uri;
NSError *error;
+ id<MediaType> mediaType;
+ id client;
}
@property (nonatomic, retain) NSURL *uri;
@property (nonatomic, retain) NSError *error;
+@property (nonatomic, retain) id<MediaType> mediaType;
+@property (nonatomic, retain) id client;
-+(Request *) initWithURI:(NSString *)uri;
++(Request *) requestWithURI:(NSString *)uri andClient:(id<RestClient>)client;
/*
* Request through http some REST service
@@ -44,6 +50,6 @@
* Post some object to a REST service
*
*/
--(Response *) post;
+-(Response *) post:(id)obj;
@end
View
34 Classes/http/Request.m
@@ -1,6 +1,6 @@
/*
* Request.m
- * restfulie-objc
+ * restfulie-objectivec
*
* Created by Bruno Fuster on 10/22/10.
*
@@ -23,17 +23,19 @@
#import "Request.h"
#import "Response.h"
-#import "Unmarshaller.h"
#import "JSONUnmarshaller.h"
+#import "JsonMediaType.h"
@implementation Request
-@synthesize uri, error;
+@synthesize uri, error, mediaType, client;
-+(Request *) initWithURI:(NSString *)uri
++(Request *) requestWithURI:(NSString *)uri andClient:(id<RestClient>)restClient
{
Request *req = [[Request alloc] init];
[req setUri:[NSURL URLWithString:uri]];
+ [req setMediaType:[restClient currentMediaType]];
+ [req setClient:restClient];
return req;
}
@@ -43,37 +45,23 @@ -(Response *) get
NSURLRequest *request = [NSURLRequest requestWithURL:self.uri];
- NSData *response = [NSURLConnection sendSynchronousRequest:request
+ NSData *responseData = [NSURLConnection sendSynchronousRequest:request
returningResponse:nil
error:&error];
if (error) {
NSLog(@"error %@", error);
}
-
- NSString *json_string = [[NSString alloc] initWithData:response
+ NSString *json_string = [[NSString alloc] initWithData:responseData
encoding:NSUTF8StringEncoding];
-
- JSONUnmarshaller *unmarshall = [[JSONUnmarshaller alloc] init];
- NSDictionary *dataDictionary = [unmarshall unmarshall:json_string];
-
- NSArray *list = [dataDictionary objectForKey:@"list"];
-
- Response *resp;
- if (list) {
- resp = [Response initWithData: list];
- } else {
- resp = [Response initWithData: [[dataDictionary allValues] objectAtIndex:0]];
- }
-
- return resp;
+ Response *response = [Response initWithData:json_string andClient:self.client];
+ return response;
}
--(Response*) post
+-(Response*) post:(id)obj
{
- //const char *data = "' ";
return nil;
}
View
36 Classes/mediatype/JsonMediaType.h
@@ -0,0 +1,36 @@
+/*
+ * JsonMediaType.h
+ * restfulie-objectivec
+ *
+ * Created by Bruno Fuster on 1/3/11.
+ *
+ * Copyright (c) 2009 Caelum - www.caelum.com.br/opensource
+ * All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#import <Foundation/Foundation.h>
+#import "Restfulie.h"
+
+@interface JsonMediaType : NSObject<MediaType> {
+
+ NSMutableDictionary *typesToEnhance;
+}
+
+@property (nonatomic, retain) NSMutableDictionary *typesToEnhance;
+
+- (void) withTypes:(NSArray*)types andCollectionNames:(NSArray*)names;
+
+
+@end
View
78 Classes/mediatype/JsonMediaType.m
@@ -0,0 +1,78 @@
+/*
+ * JsonMediaType.m
+ * restfulie-objectivec
+ *
+ * Created by Bruno Fuster on 1/3/11.
+ *
+ * Copyright (c) 2009 Caelum - www.caelum.com.br/opensource
+ * All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#import "JsonMediaType.h"
+#import "JSONUnmarshaller.h"
+
+@implementation JsonMediaType
+
+@synthesize typesToEnhance;
+
+- (id) init
+{
+ self = [super init];
+ if (self != nil) {
+ self.typesToEnhance = [[NSMutableDictionary alloc] init];
+ }
+ return self;
+}
+
+
+- (void) withTypes:(NSArray*)types andCollectionNames:(NSArray*)names {
+
+ for (id obj in types) {
+ NSString *key = NSStringFromClass([obj class]);
+ key = [key lowercaseString];
+ [self.typesToEnhance setObject:obj forKey:key];
+ }
+
+ int index = 0;
+ for (id key in names) {
+ [self.typesToEnhance setObject:[types objectAtIndex:index] forKey:key];
+ index++;
+ }
+}
+
+#pragma mark MediaType
+
+- (id) unmarshall:(NSString *)content forClient:(id<RestClient>)client {
+
+ JSONUnmarshaller *unmarshall = [[JSONUnmarshaller alloc] init];
+ NSDictionary *dataDictionary = [unmarshall unmarshall:content];
+
+ NSString *identifier = [[dataDictionary allKeys] objectAtIndex:0];
+ id type = [self.typesToEnhance objectForKey:identifier];
+
+ NSLog(@"%@", type);
+ NSLog(@"%@", [dataDictionary description]);
+
+ id resource = [[Resource alloc] initWithData:[dataDictionary objectForKey:identifier] ofType:type];
+ return resource;
+}
+
+- (void) dealloc
+{
+ [typesToEnhance release];
+ [super dealloc];
+}
+
+@end
View
14 Classes/serialize/Unmarshaller.h → Classes/mediatype/MediaType.h 100755 → 100644
@@ -1,8 +1,8 @@
/*
- * Unmarshaller.h
- * restfulie-objc
+ * MediaType.h
+ * restfulie-objectivec
*
- * Created by Bruno Fuster on 10/22/10.
+ * Created by Bruno Fuster on 1/3/11.
*
* Copyright (c) 2009 Caelum - www.caelum.com.br/opensource
* All rights reserved.
@@ -22,9 +22,7 @@
#import <Foundation/Foundation.h>
+@protocol MediaType
+-(id)unmarshall:(NSString*)content forClient:(id)client;
+@end
-@protocol Unmarshaller
-
--(NSDictionary *) unmarshall:(NSObject *) data;
-
-@end
View
7 Classes/serialize/JSONUnmarshaller.h
@@ -1,6 +1,6 @@
/***
* JSONUnmarshaller.h
- * restfulie-objc
+ * restfulie-objectivec
*
* Created by Bruno Fuster on 10/23/10.
*
@@ -21,9 +21,8 @@
*/
#import <Foundation/Foundation.h>
-#import "Unmarshaller.h"
#import "JSON.h"
-@interface JSONUnmarshaller : NSObject<Unmarshaller>
-
+@interface JSONUnmarshaller : NSObject
+-(NSDictionary *) unmarshall:(NSObject *)data;
@end
View
2 Classes/serialize/JSONUnmarshaller.m
@@ -1,6 +1,6 @@
/*
* JSONUnmarshaller.m
- * restfulie-objc
+ * restfulie-objectivec
*
* Created by Bruno Fuster on 10/22/10.
*
View
2 Classes/serialize/Serializable.h
@@ -1,6 +1,6 @@
/*
* Serializable.m
- * restfulie-objc
+ * restfulie-objectivec
*
* Created by Bruno Fuster on 10/22/10.
*
View
2 Classes/serialize/SerializableSupport.h
@@ -1,6 +1,6 @@
/*
* SerializableSupport.h
- * restfulie-objc
+ * restfulie-objectivec
*
* Created by Bruno Fuster on 10/22/10.
*
View
2 Classes/serialize/SerializableSupport.m
@@ -1,6 +1,6 @@
/*
* SerializableSupport.h
- * restfulie-objc
+ * restfulie-objectivec
*
* Created by Bruno Fuster on 10/22/10.
*
View
34 README.textile
@@ -1,48 +1,20 @@
h1. Restfulie Objective-C
-Just starting development. Only GET method is working with JSON media type by now! Please, check back soon...
+Under development. Only GET method is working with JSON media type by now! Please, come back later...
h2. Simple Installation
Just drag n' drop "Classes" and "Libs" folders into your project!
-h2. Usage
-
-GET
-
-By now you can use like this:
-
-<pre>
-Response *response = [[Restfulie at:@"http://localhost:8888/users"] get];
-NSArray *users = [response resourceWithClass:[User class]];
-
-Response *response = [[Restfulie at:@"http://localhost:8888/users/1"] get];
-User *user = [response resourceWithClass:[User class]];
-</pre>
-
-We're working on registers so it will become something like this soon:
-
-<pre>
-[Restfulie register:[User class]];
-
-Response *response = [[Restfulie at:@".."] get];
-User *user = [response resource];
-</pre>
-
-h2. iOS Async Request
-
-Create custom protocols with operation queues and attend to it in your views!
-Check this "sample":https://github.com/caelum/restfulie-objectivec/blob/master/AsyncSample.textile
-
h2. External Libs
* "json-framework":http://code.google.com/p/json-framework/
* "asihttp":http://allseeing-i.com/ASIHTTPRequest/
* "aqtoolkit extensions":https://github.com/AlanQuatermain/aqtoolkit/tree/master/Extensions
-h2. Colaborate
+h2. Collaborate
-Send us an email or DM.
+Send us an email.
"Bruno Fuster":http://brunofuster.wordpress.com ( "email":mailto:brunofuster@gmail.com ) - twitter:http://www.twitter.com/brunofuster
"Guilherme Silveira":http://guilhermesilveira.wordpress.com ( "email":mailto:guilherme.silveira@caelum.com.br ) - twitter:http://www.twitter.com/guilhermecaelum
View
2 Tests/SimpleObjParserTestCase.h
@@ -1,6 +1,6 @@
/***
* SimpleObjParserTestCase.h
- * restfulie-objc
+ * restfulie-objectivec
*
* Created by Bruno Fuster on 12/30/10.
*
View
2 Tests/SimpleObjParserTestCase.m
@@ -1,6 +1,6 @@
/***
* SimpleObjParserTestCase.m
- * restfulie-objc
+ * restfulie-objectivec
*
* Created by Bruno Fuster on 12/30/10.
*
View
2 Tests/fixtures/Address.h
@@ -1,6 +1,6 @@
/***
* Address.h
- * restfulie-objc
+ * restfulie-objectivec
*
* Created by Bruno Fuster on 12/30/10.
*
View
2 Tests/fixtures/Address.m
@@ -1,6 +1,6 @@
/***
* Address.m
- * restfulie-objc
+ * restfulie-objectivec
*
* Created by Bruno Fuster on 12/30/10.
*
View
2 Tests/fixtures/User.h
@@ -1,6 +1,6 @@
/***
* User.h
- * restfulie-objc
+ * restfulie-objectivec
*
* Created by Bruno Fuster on 12/30/10.
*
View
2 Tests/fixtures/User.m
@@ -1,6 +1,6 @@
/***
* User.m
- * restfulie-objc
+ * restfulie-objectivec
*
* Created by Bruno Fuster on 12/30/10.
*
View
40 restfulie-objectivec.xcodeproj/project.pbxproj
@@ -7,6 +7,7 @@
objects = {
/* Begin PBXBuildFile section */
+ 5D78C00812D2A87C00F4243A /* RestClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D78C00712D2A87C00F4243A /* RestClient.h */; };
5DCD422E12CCCBFC00A919BD /* Request.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DCD421A12CCCBFC00A919BD /* Request.h */; };
5DCD422F12CCCBFC00A919BD /* Request.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DCD421B12CCCBFC00A919BD /* Request.m */; };
5DCD423212CCCBFC00A919BD /* Resource.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DCD421E12CCCBFC00A919BD /* Resource.h */; };
@@ -20,8 +21,6 @@
5DCD423A12CCCBFC00A919BD /* Serializable.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DCD422712CCCBFC00A919BD /* Serializable.h */; };
5DCD423B12CCCBFC00A919BD /* SerializableSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DCD422812CCCBFC00A919BD /* SerializableSupport.h */; };
5DCD423C12CCCBFC00A919BD /* SerializableSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DCD422912CCCBFC00A919BD /* SerializableSupport.m */; };
- 5DCD423D12CCCBFC00A919BD /* Unmarshaller.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DCD422A12CCCBFC00A919BD /* Unmarshaller.h */; };
- 5DCD423E12CCCBFC00A919BD /* Unmarshaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DCD422B12CCCBFC00A919BD /* Unmarshaller.m */; };
5DCD427B12CCCCD500A919BD /* JSON.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DCD424F12CCCCD500A919BD /* JSON.h */; };
5DCD427C12CCCCD500A919BD /* NSObject+SBJSON.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DCD425012CCCCD500A919BD /* NSObject+SBJSON.h */; };
5DCD427D12CCCCD500A919BD /* NSObject+SBJSON.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DCD425112CCCCD500A919BD /* NSObject+SBJSON.m */; };
@@ -73,11 +72,17 @@
5DCD45AB12CCFA6300A919BD /* User.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DCD45AA12CCFA6300A919BD /* User.m */; };
5DCD45AE12CCFA8500A919BD /* Address.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DCD45AD12CCFA8500A919BD /* Address.m */; };
5DCD45E212CCFC1000A919BD /* librestfulie_objectivec.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D2AAC07E0554694100DB518D /* librestfulie_objectivec.a */; };
+ 5DCD463812D27EC100A919BD /* JsonMediaType.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DCD463612D27EC100A919BD /* JsonMediaType.h */; };
+ 5DCD463912D27EC100A919BD /* JsonMediaType.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DCD463712D27EC100A919BD /* JsonMediaType.m */; };
+ 5DCD469012D281BF00A919BD /* DefaultRestClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DCD468E12D281BF00A919BD /* DefaultRestClient.h */; };
+ 5DCD469112D281BF00A919BD /* DefaultRestClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DCD468F12D281BF00A919BD /* DefaultRestClient.m */; };
+ 5DCD492C12D29DFC00A919BD /* MediaType.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DCD492A12D29DFC00A919BD /* MediaType.h */; };
AA747D9F0F9514B9006C5449 /* restfulie_objectivec_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = AA747D9E0F9514B9006C5449 /* restfulie_objectivec_Prefix.pch */; };
AACBBE4A0F95108600F1A2B1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AACBBE490F95108600F1A2B1 /* Foundation.framework */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
+ 5D78C00712D2A87C00F4243A /* RestClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RestClient.h; sourceTree = "<group>"; };
5DCD421A12CCCBFC00A919BD /* Request.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Request.h; sourceTree = "<group>"; };
5DCD421B12CCCBFC00A919BD /* Request.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Request.m; sourceTree = "<group>"; };
5DCD421E12CCCBFC00A919BD /* Resource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Resource.h; sourceTree = "<group>"; };
@@ -91,8 +96,6 @@
5DCD422712CCCBFC00A919BD /* Serializable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Serializable.h; sourceTree = "<group>"; };
5DCD422812CCCBFC00A919BD /* SerializableSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SerializableSupport.h; sourceTree = "<group>"; };
5DCD422912CCCBFC00A919BD /* SerializableSupport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SerializableSupport.m; sourceTree = "<group>"; };
- 5DCD422A12CCCBFC00A919BD /* Unmarshaller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Unmarshaller.h; sourceTree = "<group>"; };
- 5DCD422B12CCCBFC00A919BD /* Unmarshaller.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Unmarshaller.m; sourceTree = "<group>"; };
5DCD424F12CCCCD500A919BD /* JSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSON.h; sourceTree = "<group>"; };
5DCD425012CCCCD500A919BD /* NSObject+SBJSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+SBJSON.h"; sourceTree = "<group>"; };
5DCD425112CCCCD500A919BD /* NSObject+SBJSON.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSObject+SBJSON.m"; sourceTree = "<group>"; };
@@ -147,6 +150,11 @@
5DCD45AA12CCFA6300A919BD /* User.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = User.m; sourceTree = "<group>"; };
5DCD45AC12CCFA8500A919BD /* Address.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Address.h; sourceTree = "<group>"; };
5DCD45AD12CCFA8500A919BD /* Address.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Address.m; sourceTree = "<group>"; };
+ 5DCD463612D27EC100A919BD /* JsonMediaType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JsonMediaType.h; sourceTree = "<group>"; };
+ 5DCD463712D27EC100A919BD /* JsonMediaType.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JsonMediaType.m; sourceTree = "<group>"; };
+ 5DCD468E12D281BF00A919BD /* DefaultRestClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DefaultRestClient.h; sourceTree = "<group>"; };
+ 5DCD468F12D281BF00A919BD /* DefaultRestClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DefaultRestClient.m; sourceTree = "<group>"; };
+ 5DCD492A12D29DFC00A919BD /* MediaType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaType.h; sourceTree = "<group>"; };
AA747D9E0F9514B9006C5449 /* restfulie_objectivec_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = restfulie_objectivec_Prefix.pch; sourceTree = SOURCE_ROOT; };
AACBBE490F95108600F1A2B1 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
D2AAC07E0554694100DB518D /* librestfulie_objectivec.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = librestfulie_objectivec.a; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -207,6 +215,7 @@
08FB77AEFE84172EC02AAC07 /* Classes */ = {
isa = PBXGroup;
children = (
+ 5DCD463212D27E9700A919BD /* mediatype */,
5DCD422412CCCBFC00A919BD /* serialize */,
5DCD421912CCCBFC00A919BD /* http */,
5DCD421E12CCCBFC00A919BD /* Resource.h */,
@@ -215,6 +224,7 @@
5DCD422112CCCBFC00A919BD /* Response.m */,
5DCD422212CCCBFC00A919BD /* Restfulie.h */,
5DCD422312CCCBFC00A919BD /* Restfulie.m */,
+ 5D78C00712D2A87C00F4243A /* RestClient.h */,
);
path = Classes;
sourceTree = "<group>";
@@ -243,6 +253,8 @@
children = (
5DCD421A12CCCBFC00A919BD /* Request.h */,
5DCD421B12CCCBFC00A919BD /* Request.m */,
+ 5DCD468E12D281BF00A919BD /* DefaultRestClient.h */,
+ 5DCD468F12D281BF00A919BD /* DefaultRestClient.m */,
);
path = http;
sourceTree = "<group>";
@@ -255,8 +267,6 @@
5DCD422712CCCBFC00A919BD /* Serializable.h */,
5DCD422812CCCBFC00A919BD /* SerializableSupport.h */,
5DCD422912CCCBFC00A919BD /* SerializableSupport.m */,
- 5DCD422A12CCCBFC00A919BD /* Unmarshaller.h */,
- 5DCD422B12CCCBFC00A919BD /* Unmarshaller.m */,
);
path = serialize;
sourceTree = "<group>";
@@ -356,6 +366,16 @@
path = runtime;
sourceTree = "<group>";
};
+ 5DCD463212D27E9700A919BD /* mediatype */ = {
+ isa = PBXGroup;
+ children = (
+ 5DCD463612D27EC100A919BD /* JsonMediaType.h */,
+ 5DCD463712D27EC100A919BD /* JsonMediaType.m */,
+ 5DCD492A12D29DFC00A919BD /* MediaType.h */,
+ );
+ path = mediatype;
+ sourceTree = "<group>";
+ };
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
@@ -371,7 +391,6 @@
5DCD423812CCCBFC00A919BD /* JSONUnmarshaller.h in Headers */,
5DCD423A12CCCBFC00A919BD /* Serializable.h in Headers */,
5DCD423B12CCCBFC00A919BD /* SerializableSupport.h in Headers */,
- 5DCD423D12CCCBFC00A919BD /* Unmarshaller.h in Headers */,
5DCD427B12CCCCD500A919BD /* JSON.h in Headers */,
5DCD427C12CCCCD500A919BD /* NSObject+SBJSON.h in Headers */,
5DCD427E12CCCCD500A919BD /* NSString+SBJSON.h in Headers */,
@@ -398,6 +417,10 @@
5DCD42A312CCCCD500A919BD /* ASIS3ServiceRequest.h in Headers */,
5DCD43B112CCD05200A919BD /* NSString+PropertyKVC.h in Headers */,
5DCD43B312CCD05200A919BD /* NSObject+Properties.h in Headers */,
+ 5DCD463812D27EC100A919BD /* JsonMediaType.h in Headers */,
+ 5DCD469012D281BF00A919BD /* DefaultRestClient.h in Headers */,
+ 5DCD492C12D29DFC00A919BD /* MediaType.h in Headers */,
+ 5D78C00812D2A87C00F4243A /* RestClient.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -512,7 +535,6 @@
5DCD423712CCCBFC00A919BD /* Restfulie.m in Sources */,
5DCD423912CCCBFC00A919BD /* JSONUnmarshaller.m in Sources */,
5DCD423C12CCCBFC00A919BD /* SerializableSupport.m in Sources */,
- 5DCD423E12CCCBFC00A919BD /* Unmarshaller.m in Sources */,
5DCD427D12CCCCD500A919BD /* NSObject+SBJSON.m in Sources */,
5DCD427F12CCCCD500A919BD /* NSString+SBJSON.m in Sources */,
5DCD428112CCCCD500A919BD /* SBJsonBase.m in Sources */,
@@ -533,6 +555,8 @@
5DCD42A412CCCCD500A919BD /* ASIS3ServiceRequest.m in Sources */,
5DCD43B212CCD05200A919BD /* NSString+PropertyKVC.m in Sources */,
5DCD43B412CCD05200A919BD /* NSObject+Properties.m in Sources */,
+ 5DCD463912D27EC100A919BD /* JsonMediaType.m in Sources */,
+ 5DCD469112D281BF00A919BD /* DefaultRestClient.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

0 comments on commit 8600688

Please sign in to comment.