Latest 1.0.0
Homepage https://github.com/kschins/YelpKit
License MIT
Platforms ios 12.0

YelpKit

A framework around the Yelp Fusion API written in Swift.

See below for all of the endpoints this framework covers:

Installation

Swift Package Manager

If you do not have any additional dependencies then add the following lines to your Package.swift file:

dependencies: [
    .Package(url: "https://github.com/kschins/YelpKit.git", "1.0.0")
]

Otherwise just add the following line to the dependencies node:

.Package(url: "https://github.com/kschins/YelpKit.git", "1.0.0")

Then, run the following command in Terminal:

swift package fetch

CocoaPods

CocoaPods is a third-party dependency manager that allows you to easily integrate external frameworks.
You can install CocoaPods with the following command:

gem install cocoapods

To add KSYelpKit to your project, add the following line to your Podfile:

pod 'KSYelpKit', '1.0.0'

Then, run the following command in Terminal:

pod install

Usage

First, you will need to visit Yelp to create an account so you can generate an API key. An API key is required to use this framework.

Once you have obtained your API key, you can do the following:

import KSYelpKit

let client = YelpAPIClient(apiKey: "YOUR_API_KEY")
let request = YelpBusinessSearch(term: "sushi", location: "Denver")
client.request(request: request) {
    switch $0 {
    case .success(let response):
        // do something with the response
    case .failure(let error):
        // do something with the error
    }
}

Latest podspec

{
    "name": "KSYelpKit",
    "version": "1.0.0",
    "summary": "A wrapper around the Yelp Fusion API written in Swift.",
    "description": "A wrapper around the Yelp Fusion API that contains all valid endpoints and responses.",
    "homepage": "https://github.com/kschins/YelpKit",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": "Kasey Schindler",
    "social_media_url": "http://twitter.com/kschins",
    "platforms": {
        "ios": "12.0"
    },
    "source": {
        "git": "https://github.com/kschins/YelpKit.git",
        "tag": "1.0.0"
    },
    "source_files": "YelpKit/YelpKit/*.swift",
    "resources": [
        "YelpKit/YelpKit/*.xcassets"
    ],
    "swift_version": "4.2"
}

Pin It on Pinterest

Share This