cdpetty / Yelp

0 stars 0 forks source link

Project 3 - Yelp

Yelp is a Yelp search app using the Yelp API.

Time spent: 3 hours spent in total

User Stories

The following required functionality is completed:

The following optional features are implemented:

The following additional features are implemented:

Please list two areas of the assignment you'd like to discuss further with your peers during the next class (examples include better ways to implement something, how to extend your app in certain ways, etc):

  1. How to create the business.swift class
  2. How to correctly implement a search

Video Walkthrough

Here's a walkthrough of implemented user stories:

Video Walkthrough

GIF created with LiceCap.

Notes

Describe any challenges encountered while building the app.

License

Copyright 2016 Clayton Petty

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

Basic Yelp client

This is a headless example of how to implement an OAuth 1.0a Yelp API client. The Yelp API provides an application token that allows applications to make unauthenticated requests to their search API.

Next steps

Sample request

Basic search with query

Business.searchWithTerm("Thai", completion: { (businesses: [Business]!, error: NSError!) -> Void in
    self.businesses = businesses

    for business in businesses {
        print(business.name!)
        print(business.address!)
    }
})

Advanced search with categories, sort, and deal filters

Business.searchWithTerm("Restaurants", sort: .Distance, categories: ["asianfusion", "burgers"], deals: true) { (businesses: [Business]!, error: NSError!) -> Void in

    for business in businesses {
        print(business.name!)
        print(business.address!)
    }
}