Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #74 from rrbrambley/master

add deactivateChannel methods
  • Loading branch information...
commit 7bc6e3ab613980fa176588643a9445355841e949 2 parents 00dcd2a + fe1cb7f
@berg berg authored
Showing with 13 additions and 0 deletions.
  1. +2 −0  ADNKit/ANKClient+ANKChannel.h
  2. +11 −0 ADNKit/ANKClient+ANKChannel.m
View
2  ADNKit/ANKClient+ANKChannel.h
@@ -50,4 +50,6 @@
- (ANKJSONRequestOperation *)unmuteChannel:(ANKChannel *)channel completion:(ANKClientCompletionBlock)completionHandler;
- (ANKJSONRequestOperation *)unmuteChannelWithID:(NSString *)channelID completion:(ANKClientCompletionBlock)completionHandler;
+- (ANKJSONRequestOperation *)deactivateChannel:(ANKChannel *)channel completion:(ANKClientCompletionBlock)completionHandler;
+- (ANKJSONRequestOperation *)deactivateChannelWithID:(NSString *)channelID completion:(ANKClientCompletionBlock)completionHandler;
@end
View
11 ADNKit/ANKClient+ANKChannel.m
@@ -247,5 +247,16 @@ - (ANKJSONRequestOperation *)unmuteChannelWithID:(NSString *)channelID completio
failure:[self failureHandlerForClientHandler:completionHandler]];
}
+// http://developers.app.net/docs/resources/channel/lifecycle/#deactivate-a-channel
+- (ANKJSONRequestOperation *)deactivateChannel:(ANKChannel *)channel completion:(ANKClientCompletionBlock)completionHandler {
+ return [self deactivateChannelWithID:channel.channelID completion:completionHandler];
+}
+
+- (ANKJSONRequestOperation *)deactivateChannelWithID:(NSString *)channelID completion:(ANKClientCompletionBlock)completionHandler {
+ return [self enqueueDELETEPath:[NSString stringWithFormat:@"channels/%@", channelID]
+ parameters:nil
+ success:[self successHandlerForResourceClass:[ANKChannel class] clientHandler:completionHandler]
+ failure:[self failureHandlerForClientHandler:completionHandler]];
+}
@end

0 comments on commit 7bc6e3a

Please sign in to comment.
Something went wrong with that request. Please try again.