Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 32 lines (24 sloc) 0.9 kB
4ab052d Add user search request
Brent Royal-Gordon authored
1 //
2 // ANUsersMatchingSearchQueryRequest.m
8a13170 Fix project name in various files
Brent Royal-Gordon authored
3 // AppNetKit
4ab052d Add user search request
Brent Royal-Gordon authored
4 //
5 // Created by Brent Royal-Gordon on 9/29/12.
16871fc Declare AppNetKit to be MIT-licensed
Brent Royal-Gordon authored
6 // Copyright (c) 2012 Architechies. See README.md for licensing information.
4ab052d Add user search request
Brent Royal-Gordon authored
7 //
8
9 #import "ANUsersMatchingSearchQueryRequest.h"
10
11 @implementation ANUsersMatchingSearchQueryRequest
12
13 - (NSURL *)URL {
14 return [NSURL URLWithString:@"users/search" relativeToURL:[self.session URLForStreamAPIVersion:ANStreamAPIVersion0]];
15 }
16
17 - (NSDictionary *)parameters {
18 return [NSDictionary dictionaryWithObject:self.query forKey:@"q"];
19 }
20
21 - (ANRequestMethod)method {
22 return ANRequestMethodGet;
23 }
24
25 - (void)sendRequestWithCompletion:(ANUserListRequestCompletion)completion {
26 [self sendRequestWithRepresentationCompletion:^(ANResponse * response, id rep, NSError *error) {
27 [self.session completeUserListRequest:completion withResponse:response representation:rep error:error];
28 }];
29 }
30
31 @end
Something went wrong with that request. Please try again.