Skip to content

Commit f5f108f

Browse files
author
Joey Lorich
committed
Add service oriented delegate and routes
1 parent a77f97b commit f5f108f

23 files changed

Lines changed: 655 additions & 192 deletions

EasyReader.xcodeproj/project.pbxproj

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,27 @@
2626
9D140BF5171F68E000CDD319 /* button_add@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 9D140BF4171F68E000CDD319 /* button_add@2x.png */; };
2727
9D16D30718DA2B3A001E9C38 /* CSBaseTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D16D30618DA2B3A001E9C38 /* CSBaseTestCase.m */; };
2828
9D16D30918DA2E43001E9C38 /* UserTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D16D30818DA2E43001E9C38 /* UserTests.m */; };
29+
9D16D32818DB57D0001E9C38 /* CSRegisterRoutesService.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D16D32718DB57D0001E9C38 /* CSRegisterRoutesService.m */; };
30+
9D16D32918DB57D0001E9C38 /* CSRegisterRoutesService.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D16D32718DB57D0001E9C38 /* CSRegisterRoutesService.m */; };
31+
9D16D32A18DB57D0001E9C38 /* CSRegisterRoutesService.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D16D32718DB57D0001E9C38 /* CSRegisterRoutesService.m */; };
32+
9D16D33818DB75D9001E9C38 /* CSCoreDataService.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D16D33718DB75D9001E9C38 /* CSCoreDataService.m */; };
33+
9D16D33918DB75D9001E9C38 /* CSCoreDataService.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D16D33718DB75D9001E9C38 /* CSCoreDataService.m */; };
34+
9D16D33A18DB75D9001E9C38 /* CSCoreDataService.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D16D33718DB75D9001E9C38 /* CSCoreDataService.m */; };
35+
9D16D33D18DB7767001E9C38 /* CSFeedUpdateService.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D16D33C18DB7767001E9C38 /* CSFeedUpdateService.m */; };
36+
9D16D33E18DB7767001E9C38 /* CSFeedUpdateService.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D16D33C18DB7767001E9C38 /* CSFeedUpdateService.m */; };
37+
9D16D33F18DB7767001E9C38 /* CSFeedUpdateService.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D16D33C18DB7767001E9C38 /* CSFeedUpdateService.m */; };
38+
9D16D34B18DBA9E9001E9C38 /* AKRoute.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D16D34318DBA9E9001E9C38 /* AKRoute.m */; };
39+
9D16D34C18DBA9E9001E9C38 /* AKRoute.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D16D34318DBA9E9001E9C38 /* AKRoute.m */; };
40+
9D16D34D18DBA9E9001E9C38 /* AKRoute.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D16D34318DBA9E9001E9C38 /* AKRoute.m */; };
41+
9D16D34E18DBA9E9001E9C38 /* AKRouter.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D16D34518DBA9E9001E9C38 /* AKRouter.m */; };
42+
9D16D34F18DBA9E9001E9C38 /* AKRouter.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D16D34518DBA9E9001E9C38 /* AKRouter.m */; };
43+
9D16D35018DBA9E9001E9C38 /* AKRouter.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D16D34518DBA9E9001E9C38 /* AKRouter.m */; };
44+
9D16D35118DBA9E9001E9C38 /* SOApplicationDelegateService.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D16D34818DBA9E9001E9C38 /* SOApplicationDelegateService.m */; };
45+
9D16D35218DBA9E9001E9C38 /* SOApplicationDelegateService.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D16D34818DBA9E9001E9C38 /* SOApplicationDelegateService.m */; };
46+
9D16D35318DBA9E9001E9C38 /* SOApplicationDelegateService.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D16D34818DBA9E9001E9C38 /* SOApplicationDelegateService.m */; };
47+
9D16D35418DBA9E9001E9C38 /* SOApplicationDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D16D34A18DBA9E9001E9C38 /* SOApplicationDelegate.m */; };
48+
9D16D35518DBA9E9001E9C38 /* SOApplicationDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D16D34A18DBA9E9001E9C38 /* SOApplicationDelegate.m */; };
49+
9D16D35618DBA9E9001E9C38 /* SOApplicationDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D16D34A18DBA9E9001E9C38 /* SOApplicationDelegate.m */; };
2950
9D27B1DF1715DECB001C39CF /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 9D27B1DE1715DECB001C39CF /* Default-568h@2x.png */; };
3051
9D2FDF881721EE4400535763 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 9D2FDF871721EE4400535763 /* Default@2x.png */; };
3152
9D2FDF8A1721EE4800535763 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 9D2FDF891721EE4700535763 /* Default.png */; };
@@ -232,6 +253,20 @@
232253
9D16D30518DA2B3A001E9C38 /* CSBaseTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSBaseTestCase.h; sourceTree = "<group>"; };
233254
9D16D30618DA2B3A001E9C38 /* CSBaseTestCase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CSBaseTestCase.m; sourceTree = "<group>"; };
234255
9D16D30818DA2E43001E9C38 /* UserTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = UserTests.m; path = Application/Models/UserTests.m; sourceTree = "<group>"; };
256+
9D16D32618DB57D0001E9C38 /* CSRegisterRoutesService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSRegisterRoutesService.h; sourceTree = "<group>"; };
257+
9D16D32718DB57D0001E9C38 /* CSRegisterRoutesService.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CSRegisterRoutesService.m; sourceTree = "<group>"; };
258+
9D16D33618DB75D9001E9C38 /* CSCoreDataService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSCoreDataService.h; sourceTree = "<group>"; };
259+
9D16D33718DB75D9001E9C38 /* CSCoreDataService.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CSCoreDataService.m; sourceTree = "<group>"; };
260+
9D16D33B18DB7767001E9C38 /* CSFeedUpdateService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSFeedUpdateService.h; sourceTree = "<group>"; };
261+
9D16D33C18DB7767001E9C38 /* CSFeedUpdateService.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CSFeedUpdateService.m; sourceTree = "<group>"; };
262+
9D16D34218DBA9E9001E9C38 /* AKRoute.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AKRoute.h; sourceTree = "<group>"; };
263+
9D16D34318DBA9E9001E9C38 /* AKRoute.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AKRoute.m; sourceTree = "<group>"; };
264+
9D16D34418DBA9E9001E9C38 /* AKRouter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AKRouter.h; sourceTree = "<group>"; };
265+
9D16D34518DBA9E9001E9C38 /* AKRouter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AKRouter.m; sourceTree = "<group>"; };
266+
9D16D34718DBA9E9001E9C38 /* SOApplicationDelegateService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SOApplicationDelegateService.h; sourceTree = "<group>"; };
267+
9D16D34818DBA9E9001E9C38 /* SOApplicationDelegateService.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SOApplicationDelegateService.m; sourceTree = "<group>"; };
268+
9D16D34918DBA9E9001E9C38 /* SOApplicationDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SOApplicationDelegate.h; sourceTree = "<group>"; };
269+
9D16D34A18DBA9E9001E9C38 /* SOApplicationDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SOApplicationDelegate.m; sourceTree = "<group>"; };
235270
9D27B1DE1715DECB001C39CF /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = "<group>"; };
236271
9D2FDF871721EE4400535763 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = "<group>"; };
237272
9D2FDF891721EE4700535763 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = "<group>"; };
@@ -412,6 +447,50 @@
412447
name = Controllers;
413448
sourceTree = "<group>";
414449
};
450+
9D16D33518DB75BF001E9C38 /* Services */ = {
451+
isa = PBXGroup;
452+
children = (
453+
9D16D32618DB57D0001E9C38 /* CSRegisterRoutesService.h */,
454+
9D16D32718DB57D0001E9C38 /* CSRegisterRoutesService.m */,
455+
9D16D33618DB75D9001E9C38 /* CSCoreDataService.h */,
456+
9D16D33718DB75D9001E9C38 /* CSCoreDataService.m */,
457+
9D16D33B18DB7767001E9C38 /* CSFeedUpdateService.h */,
458+
9D16D33C18DB7767001E9C38 /* CSFeedUpdateService.m */,
459+
);
460+
name = Services;
461+
sourceTree = "<group>";
462+
};
463+
9D16D34018DBA9E9001E9C38 /* Library */ = {
464+
isa = PBXGroup;
465+
children = (
466+
9D16D34118DBA9E9001E9C38 /* apikit */,
467+
9D16D34618DBA9E9001E9C38 /* ServiceOrientedAppDelegate */,
468+
);
469+
path = Library;
470+
sourceTree = "<group>";
471+
};
472+
9D16D34118DBA9E9001E9C38 /* apikit */ = {
473+
isa = PBXGroup;
474+
children = (
475+
9D16D34218DBA9E9001E9C38 /* AKRoute.h */,
476+
9D16D34318DBA9E9001E9C38 /* AKRoute.m */,
477+
9D16D34418DBA9E9001E9C38 /* AKRouter.h */,
478+
9D16D34518DBA9E9001E9C38 /* AKRouter.m */,
479+
);
480+
path = apikit;
481+
sourceTree = "<group>";
482+
};
483+
9D16D34618DBA9E9001E9C38 /* ServiceOrientedAppDelegate */ = {
484+
isa = PBXGroup;
485+
children = (
486+
9D16D34718DBA9E9001E9C38 /* SOApplicationDelegateService.h */,
487+
9D16D34818DBA9E9001E9C38 /* SOApplicationDelegateService.m */,
488+
9D16D34918DBA9E9001E9C38 /* SOApplicationDelegate.h */,
489+
9D16D34A18DBA9E9001E9C38 /* SOApplicationDelegate.m */,
490+
);
491+
path = ServiceOrientedAppDelegate;
492+
sourceTree = "<group>";
493+
};
415494
9D429774170E166E00E73BFE /* Menu */ = {
416495
isa = PBXGroup;
417496
children = (
@@ -569,6 +648,7 @@
569648
9DAC16CF1709D48E00383722 /* EasyReader */ = {
570649
isa = PBXGroup;
571650
children = (
651+
9D16D34018DBA9E9001E9C38 /* Library */,
572652
9DAC1717170A043200383722 /* Application */,
573653
9DAC171F170A043200383722 /* Other Sources */,
574654
9DAC1722170A043200383722 /* Resources */,
@@ -593,6 +673,7 @@
593673
9DAC1718170A043200383722 /* AppDelegates */ = {
594674
isa = PBXGroup;
595675
children = (
676+
9D16D33518DB75BF001E9C38 /* Services */,
596677
9DAC1719170A043200383722 /* CSAppDelegate.h */,
597678
9DAC171A170A043200383722 /* CSAppDelegate.m */,
598679
);
@@ -1008,6 +1089,7 @@
10081089
isa = PBXSourcesBuildPhase;
10091090
buildActionMask = 2147483647;
10101091
files = (
1092+
9D16D33E18DB7767001E9C38 /* CSFeedUpdateService.m in Sources */,
10111093
9D79270A18DA1D0300E1D3E1 /* Feed.m in Sources */,
10121094
9D79270B18DA1D0300E1D3E1 /* CSAppDelegate.m in Sources */,
10131095
9D79270C18DA1D0300E1D3E1 /* main.m in Sources */,
@@ -1019,21 +1101,28 @@
10191101
9D79271218DA1D0300E1D3E1 /* CSRootViewController.m in Sources */,
10201102
9D79271318DA1D0300E1D3E1 /* FeedItem.m in Sources */,
10211103
9D79271418DA1D0300E1D3E1 /* User.m in Sources */,
1104+
9D16D34F18DBA9E9001E9C38 /* AKRouter.m in Sources */,
10221105
9D79271518DA1D0300E1D3E1 /* CSFeedItemUpdater.m in Sources */,
10231106
9D79271618DA1D0300E1D3E1 /* CSFakedDataRequestor.m in Sources */,
10241107
9D79271718DA1D0300E1D3E1 /* CSMenuLeftViewController.m in Sources */,
10251108
9D79271818DA1D0300E1D3E1 /* CSResponsiveApiRequestor.m in Sources */,
10261109
9D79271918DA1D0300E1D3E1 /* Easy Reader.xcdatamodeld in Sources */,
1110+
9D16D32918DB57D0001E9C38 /* CSRegisterRoutesService.m in Sources */,
10271111
9D79271A18DA1D0300E1D3E1 /* CSFeedAddViewController.m in Sources */,
10281112
9D79271B18DA1D0300E1D3E1 /* NSObject+CSNilAdditions.m in Sources */,
1113+
9D16D33918DB75D9001E9C38 /* CSCoreDataService.m in Sources */,
1114+
9D16D34C18DBA9E9001E9C38 /* AKRoute.m in Sources */,
10291115
9D79271C18DA1D0300E1D3E1 /* CSFeedItemCollectionViewDataSource.m in Sources */,
1116+
9D16D35518DBA9E9001E9C38 /* SOApplicationDelegate.m in Sources */,
1117+
9D16D35218DBA9E9001E9C38 /* SOApplicationDelegateService.m in Sources */,
10301118
);
10311119
runOnlyForDeploymentPostprocessing = 0;
10321120
};
10331121
9D79274D18DA1D3800E1D3E1 /* Sources */ = {
10341122
isa = PBXSourcesBuildPhase;
10351123
buildActionMask = 2147483647;
10361124
files = (
1125+
9D16D33F18DB7767001E9C38 /* CSFeedUpdateService.m in Sources */,
10371126
9D79274E18DA1D3800E1D3E1 /* Feed.m in Sources */,
10381127
9D79274F18DA1D3800E1D3E1 /* CSAppDelegate.m in Sources */,
10391128
9D79275018DA1D3800E1D3E1 /* main.m in Sources */,
@@ -1045,14 +1134,20 @@
10451134
9D79275618DA1D3800E1D3E1 /* CSRootViewController.m in Sources */,
10461135
9D79275718DA1D3800E1D3E1 /* FeedItem.m in Sources */,
10471136
9D79275818DA1D3800E1D3E1 /* User.m in Sources */,
1137+
9D16D35018DBA9E9001E9C38 /* AKRouter.m in Sources */,
10481138
9D79275918DA1D3800E1D3E1 /* CSFeedItemUpdater.m in Sources */,
10491139
9D79275A18DA1D3800E1D3E1 /* CSFakedDataRequestor.m in Sources */,
10501140
9D79275B18DA1D3800E1D3E1 /* CSMenuLeftViewController.m in Sources */,
10511141
9D79275C18DA1D3800E1D3E1 /* CSResponsiveApiRequestor.m in Sources */,
10521142
9D79275D18DA1D3800E1D3E1 /* Easy Reader.xcdatamodeld in Sources */,
1143+
9D16D32A18DB57D0001E9C38 /* CSRegisterRoutesService.m in Sources */,
10531144
9D79275E18DA1D3800E1D3E1 /* CSFeedAddViewController.m in Sources */,
10541145
9D79275F18DA1D3800E1D3E1 /* NSObject+CSNilAdditions.m in Sources */,
1146+
9D16D33A18DB75D9001E9C38 /* CSCoreDataService.m in Sources */,
1147+
9D16D34D18DBA9E9001E9C38 /* AKRoute.m in Sources */,
10551148
9D79276018DA1D3800E1D3E1 /* CSFeedItemCollectionViewDataSource.m in Sources */,
1149+
9D16D35618DBA9E9001E9C38 /* SOApplicationDelegate.m in Sources */,
1150+
9D16D35318DBA9E9001E9C38 /* SOApplicationDelegateService.m in Sources */,
10561151
);
10571152
runOnlyForDeploymentPostprocessing = 0;
10581153
};
@@ -1069,6 +1164,7 @@
10691164
isa = PBXSourcesBuildPhase;
10701165
buildActionMask = 2147483647;
10711166
files = (
1167+
9D16D33D18DB7767001E9C38 /* CSFeedUpdateService.m in Sources */,
10721168
0DE51FF818CF919900454E51 /* Feed.m in Sources */,
10731169
9DAC172D170A043200383722 /* CSAppDelegate.m in Sources */,
10741170
9DAC172E170A043200383722 /* main.m in Sources */,
@@ -1080,14 +1176,20 @@
10801176
9D8C6C5D170CA12500B18012 /* CSRootViewController.m in Sources */,
10811177
0DE51FF418CF911000454E51 /* FeedItem.m in Sources */,
10821178
0DE51FF518CF911000454E51 /* User.m in Sources */,
1179+
9D16D34E18DBA9E9001E9C38 /* AKRouter.m in Sources */,
10831180
274D540618D0E8D80096831A /* CSFeedItemUpdater.m in Sources */,
10841181
274D540218D0E5C20096831A /* CSFakedDataRequestor.m in Sources */,
10851182
9D429770170E164D00E73BFE /* CSMenuLeftViewController.m in Sources */,
10861183
8E7F403218D3596C00A6FED6 /* CSResponsiveApiRequestor.m in Sources */,
10871184
9DF4BB1F17130E99001DCC88 /* Easy Reader.xcdatamodeld in Sources */,
1185+
9D16D32818DB57D0001E9C38 /* CSRegisterRoutesService.m in Sources */,
10881186
9DFBC0991714957E006BF840 /* CSFeedAddViewController.m in Sources */,
10891187
2751F4D618DA02C100339C96 /* NSObject+CSNilAdditions.m in Sources */,
1188+
9D16D33818DB75D9001E9C38 /* CSCoreDataService.m in Sources */,
1189+
9D16D34B18DBA9E9001E9C38 /* AKRoute.m in Sources */,
10901190
2751F4E218DA0D3000339C96 /* CSFeedItemCollectionViewDataSource.m in Sources */,
1191+
9D16D35418DBA9E9001E9C38 /* SOApplicationDelegate.m in Sources */,
1192+
9D16D35118DBA9E9001E9C38 /* SOApplicationDelegateService.m in Sources */,
10911193
);
10921194
runOnlyForDeploymentPostprocessing = 0;
10931195
};

EasyReader/Application/Api/CSFakedDataRequestor.m

Lines changed: 41 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -7,52 +7,53 @@
77
//
88

99
#import "CSFakedDataRequestor.h"
10+
#import "AKRouter.h"
1011

1112
@implementation CSFakedDataRequestor
1213

1314
- (void) requestRoute:(NSString *) routeName
14-
withParams:(NSDictionary *) params
15-
success:(void(^)(AFHTTPRequestOperation *operation, id responseObject)) successBlock
16-
failure:(void(^)(AFHTTPRequestOperation *operation, id responseObject)) failureBlock;
15+
withParams:(NSDictionary *) params
16+
success:(void(^)(AFHTTPRequestOperation *operation, id responseObject)) successBlock
17+
failure:(void(^)(AFHTTPRequestOperation *operation, id responseObject)) failureBlock;
1718
{
18-
NSDictionary *route = [self routes][routeName];
19-
NSString *method = route[@"method"];
20-
NSString *path = route[@"path"];
21-
22-
NSDictionary *data;
23-
24-
if([method isEqualToString:@"GET"]) {
25-
if ([path rangeOfString:@"feed_items"].location != NSNotFound) {
26-
data = [self feedItemsResponse];
27-
} else if ([path rangeOfString:@"feeds"].location != NSNotFound) {
28-
//for now, the feed defaults and search return the same values
29-
data = [self feedsResponse];
19+
20+
NSString *path = [[AKRouter shared] pathFor:routeName params:params];
21+
AKRequestMethod method = [[AKRouter shared] methodFor:routeName];
22+
23+
NSDictionary *data;
24+
25+
if(method == kAKRequestMethodGET) {
26+
if ([path rangeOfString:@"feed_items"].location != NSNotFound) {
27+
data = [self feedItemsResponse];
28+
} else if ([path rangeOfString:@"feeds"].location != NSNotFound) {
29+
//for now, the feed defaults and search return the same values
30+
data = [self feedsResponse];
31+
} else {
32+
//this path is not handled by the response faker
33+
data = @{};
34+
}
3035
} else {
31-
//this path is not handled by the response faker
32-
data = @{};
36+
//post/other requests not supported right now
37+
data = @{};
3338
}
34-
} else {
35-
//post/other requests not supported right now
36-
data = @{};
37-
}
38-
39-
if (successBlock) successBlock(nil, data);
39+
40+
if (successBlock) successBlock(nil, data);
4041
}
4142

4243
//these feeds are used for both the search and the defaults endpoints
4344
//their ids should match the feed_id fields on the feedItemsResponse
4445
- (NSDictionary *) feedsResponse
4546
{
46-
NSArray *items = [NSArray arrayWithObjects:@{@"id": @1,
47+
NSArray *items = [NSArray arrayWithObjects:@{@"id": @1,
4748
@"name": @"Cloudspace Feed",
4849
@"url": @"http://www.engadget.com/rss.xml",
4950
@"icon": @"http://s3.amazonaws.com/rss.cloudspace.com/feed/1/icon.png", //note: this image does not work on 3-11-2014
5051
@"feed_items": @[]},
51-
@{@"id": @2,
52-
@"name": @"EasyReader Feed",
53-
@"url": @"http://www.engadget.com/rss.xml",
54-
@"icon": @"http://s3.amazonaws.com/rss.cloudspace.com/feed/2/icon.png", //note: this image does not work on 3-11-2014
55-
@"feed_items": @[]}, nil];
52+
@{@"id": @2,
53+
@"name": @"EasyReader Feed",
54+
@"url": @"http://www.engadget.com/rss.xml",
55+
@"icon": @"http://s3.amazonaws.com/rss.cloudspace.com/feed/2/icon.png", //note: this image does not work on 3-11-2014
56+
@"feed_items": @[]}, nil];
5657
return @{@"feeds": items};
5758
}
5859

@@ -148,17 +149,17 @@ - (NSDictionary *) feedItemsResponse
148149
@"created_at": @"2014-03-05T22:32:41+00:00",
149150
@"updated_at": @"2014-03-05T22:32:41+00:00",
150151
@"published_at": @"2014-03-04T19:52:21+00:00"}, nil];
151-
152-
NSRange subarrayRange;
153-
if ( !self.requestCounter ) self.requestCounter = 1;
154-
if ( self.requestCounter == 1 ){
155-
subarrayRange = NSMakeRange(0,4);
156-
} else {
157-
subarrayRange = NSMakeRange(self.requestCounter*2,2);
158-
}
159-
self.requestCounter++;
160-
161-
return @{@"feed_items": [items subarrayWithRange:subarrayRange]};
152+
153+
NSRange subarrayRange;
154+
if ( !self.requestCounter ) self.requestCounter = 1;
155+
if ( self.requestCounter == 1 ){
156+
subarrayRange = NSMakeRange(0,4);
157+
} else {
158+
subarrayRange = NSMakeRange(self.requestCounter*2,2);
159+
}
160+
self.requestCounter++;
161+
162+
return @{@"feed_items": [items subarrayWithRange:subarrayRange]};
162163
}
163164

164165

EasyReader/Application/Api/CSResponsiveApiRequestor.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,5 @@
1717
success:(void(^)())successBlock
1818
failure:(void(^)())failureBlock;
1919

20-
@property NSDictionary *routes;
21-
22-
- (NSString *) buildUrlByPath:(NSString *) path;
2320

2421
@end

0 commit comments

Comments
 (0)