Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
155 additions
and
0 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
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 @@ | ||
// | ||
// ANFilterRequest.h | ||
// Alef | ||
// | ||
// Created by Brent Royal-Gordon on 10/21/12. | ||
// Copyright (c) 2012 Architechies. All rights reserved. | ||
// | ||
|
||
#import "ANAuthenticatedRequest.h" | ||
|
||
@interface ANFilterRequest : ANAuthenticatedRequest | ||
|
||
@property (nonatomic,assign) ANResourceID filterID; | ||
|
||
- (void)sendRequestWithCompletion:(ANFilterRequestCompletion)completion; | ||
|
||
@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,31 @@ | ||
// | ||
// ANFilterRequest.m | ||
// Alef | ||
// | ||
// Created by Brent Royal-Gordon on 10/21/12. | ||
// Copyright (c) 2012 Architechies. All rights reserved. | ||
// | ||
|
||
#import "ANFilterRequest.h" | ||
|
||
@implementation ANFilterRequest | ||
|
||
- (NSURL *)URL { | ||
return [NSURL URLWithString:[NSString stringWithFormat:@"filters/%lld", self.filterID] relativeToURL:[self.session URLForStreamAPIVersion:ANStreamAPIVersion0]]; | ||
} | ||
|
||
- (NSDictionary *)parameters { | ||
return nil; | ||
} | ||
|
||
- (ANRequestMethod)method { | ||
return ANRequestMethodGet; | ||
} | ||
|
||
- (void)sendRequestWithCompletion:(ANFilterRequestCompletion)completion { | ||
[self sendRequestWithRepresentationCompletion:^(ANResponse *response, id rep, NSError *error) { | ||
[self.session completeFilterRequest:completion withResponse:response representation:rep error:error]; | ||
}]; | ||
} | ||
|
||
@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,15 @@ | ||
// | ||
// ANFiltersForCurrentUserRequest.h | ||
// Alef | ||
// | ||
// Created by Brent Royal-Gordon on 10/21/12. | ||
// Copyright (c) 2012 Architechies. All rights reserved. | ||
// | ||
|
||
#import "ANAuthenticatedRequest.h" | ||
|
||
@interface ANFiltersForCurrentUserRequest : ANAuthenticatedRequest | ||
|
||
- (void)sendRequestWithCompletion:(ANFilterListRequestCompletion)completion; | ||
|
||
@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,31 @@ | ||
// | ||
// ANFiltersForCurrentUserRequest.m | ||
// Alef | ||
// | ||
// Created by Brent Royal-Gordon on 10/21/12. | ||
// Copyright (c) 2012 Architechies. All rights reserved. | ||
// | ||
|
||
#import "ANFiltersForCurrentUserRequest.h" | ||
|
||
@implementation ANFiltersForCurrentUserRequest | ||
|
||
- (NSURL *)URL { | ||
return [NSURL URLWithString:@"filters" relativeToURL:[self.session URLForStreamAPIVersion:ANStreamAPIVersion0]]; | ||
} | ||
|
||
- (NSDictionary *)parameters { | ||
return nil; | ||
} | ||
|
||
- (ANRequestMethod)method { | ||
return ANRequestMethodGet; | ||
} | ||
|
||
- (void)sendRequestWithCompletion:(ANFilterListRequestCompletion)completion { | ||
[self sendRequestWithRepresentationCompletion:^(ANResponse *response, id rep, NSError *error) { | ||
[self.session completeFilterListRequest:completion withResponse:response representation:rep error:error]; | ||
}]; | ||
} | ||
|
||
@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
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