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
6 changed files
with
63 additions
and
6 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
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,18 @@ | ||
// | ||
// ANUpdateFilterRequest.h | ||
// Alef | ||
// | ||
// Created by Brent Royal-Gordon on 10/21/12. | ||
// Copyright (c) 2012 Architechies. All rights reserved. | ||
// | ||
|
||
#import "ANAuthenticatedRequest.h" | ||
|
||
@interface ANUpdateFilterRequest : ANAuthenticatedRequest | ||
|
||
@property (nonatomic,assign) ANResourceID filterID; | ||
@property (nonatomic,strong) ANDraftFilter * draftFilter; | ||
|
||
- (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 @@ | ||
// | ||
// ANUpdateFilterRequest.m | ||
// Alef | ||
// | ||
// Created by Brent Royal-Gordon on 10/21/12. | ||
// Copyright (c) 2012 Architechies. All rights reserved. | ||
// | ||
|
||
#import "ANUpdateFilterRequest.h" | ||
|
||
@implementation ANUpdateFilterRequest | ||
|
||
- (NSURL *)URL { | ||
return [NSURL URLWithString:[NSString stringWithFormat:@"filters/%lld", self.filterID] relativeToURL:[self.session URLForStreamAPIVersion:ANStreamAPIVersion0]]; | ||
} | ||
|
||
- (NSDictionary *)parameters { | ||
return self.draftFilter.representation; | ||
} | ||
|
||
- (ANRequestMethod)method { | ||
return ANRequestMethodPut; | ||
} | ||
|
||
- (void)sendRequestWithCompletion:(ANFilterRequestCompletion)completion { | ||
[self sendRequestWithRepresentationCompletion:^(ANResponse *response, id rep, NSError *error) { | ||
[self.session completeFilterRequest:completion withResponse:response representation:rep error:error]; | ||
}]; | ||
} | ||
|
||
@end |