TestsTested | ✓ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Dec 2014 |
Maintained by Unclaimed.
Picky is lightweight semantic text search engine. The Picky iOS SDK enables your iOS app to talk to a Picky server and to easily perform search operations.
The Picky iOS SDK is a breeze to setup and use. All you need to do is add the kit to your app, include the header in your code and perform a search operation. That's it.
#import "Picky.h"
NSString* url = @"http://search.cocoapods.org/api/pods";
NSDictionary* params = @{@"query" : @"test", @"start-at" : @"50", @"amount" : @"100"};
PickySearchOperation* operation = [PickySearchOperation operationWithUrlAndParams:url params:params error:error];
[operation search:^(Picky* result)
{
NSLog(@"Got %d Picky results at offset %d in %f seconds", result.total, result.offset, result.duration);
}
failure:^(NSString* errorMessage)
{
NSLog(@"Picky Error: %@", errorMessage);
}];
A very simple sample app is included in the code, that performs a simple search operation on the CocoaPods API.
The sample app will perform the following search:
GET http://search.cocoapods.org/api/pods?query=test&amount=100&start-at=50
You should be getting a successful prompt on the console:
2014-04-02 23:39:20.650 Picky[7381:a0b] Got 137 Picky results at offset 50 in 0.000233 seconds
The code was tested against an initial behaviour-driven specification that verifies the Picky JSON parsing as well as the search operation functionality.
All 3 tests should pass successfully
Executed 3 tests, with 0 failures (0 unexpected) in 0.339 (0.341) seconds
The Picky iOS SDK is made available under the MIT license. Pleace see the LICENSE file for more details.