Skip to content

A wrapper around the Yelp API written in Swift.

License

Notifications You must be signed in to change notification settings

kschins/YelpKit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
    }
}

About

A wrapper around the Yelp API written in Swift.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages