An open API service indexing awesome lists of open source software.

https://github.com/keith/ksqueryitem

A NSDictionary category to return NSURLQueryItems
https://github.com/keith/ksqueryitem

Last synced: 10 months ago
JSON representation

A NSDictionary category to return NSURLQueryItems

Awesome Lists containing this project

README

          

# KSQueryItem

[![Build Status](https://travis-ci.org/Keithbsmiley/KSQueryItem.svg?branch=master)](https://travis-ci.org/Keithbsmiley/KSQueryItem)

A simple `NSDictionary` category to return
[`NSURLQueryItems`][NSURLQueryItem] for use with
[`NSURLComponents`][NSURLComponents]

[NSURLQueryItem]: https://developer.apple.com/library/prerelease/ios/documentation/Foundation/Reference/NSURLQueryItem_Class/index.html
[NSURLComponents]: https://developer.apple.com/library/prerelease/ios/documentation/Foundation/Reference/NSURLComponents_class/index.html

## Usage

```objective-c
NSURLComponents *components = ...
NSDictionary *params = @{@"user": @"archer", @"password": @"guest"};
components.queryItems = [params ks_queryItems];
```

## Setup

### With [CocoaPods](http://cocoapods.org)

```ruby
pod "KSQueryItem", "~> 1.0.0"
```

Then (in your Bridging header for swift):

```objective-c
#import
```