A simple and lightweight resturant finder using the Yelp API

Overview

CiboKit

A simple and lightweight resturant finder using the Yelp API

What is CiboKit?

CiboKit is used in our app, Allike, to find nearby restaurants using Swift’s concurrency. It is built modularly to support alternative APIs and makes searching these APIs for resturants super simple and easy. In just a few lines of code, you can search for dozens of nearby restaurants asynchronously (non-asynchronous functions are also available).

Cibo comes from the Italian word for food.

Usage

Initialize the framework using the Yelp API. You can create an app and get credentials for Yelp here.

let cibo = Cibo(.yelp(.init(clientID: "INSERT_CLIENT_ID",
                            apiKey: "INSERT_API_KEY")))

Then you can use this object to search.

Asynchronously
try await cibo.search(.food,
                      coordinates: Coordinates(latitude: 0,
                                               longitude: 0),
                      radius: 40000,
                      limit: 50)
// or to use default values based on the API
try await cibo.search(coordinates: Coordinates(latitude: 0,
                                               longitude: 0))
Synchronously
cibo.search(coordinates: Coordinates(latitude: 0,
                                     longitude: 0)) { result in
    switch result {
    case .success(let locations):
        // Got locations
    case .failure(let error):
        // Failed somewhere
    }
}

Use in SwiftUI

You can add the Cibo object as an environment variable to SwiftUI views.

@Environment(\.cibo) var cibo

view.environment(\.cibo, cibo)

Installation

Add it as a Swift Package

https://github.com/Allike-App/CiboKit.git

Acknowledgements

You might also like...
Demo project using React Native technology to create a simple iOS app to find music in iTunes
Demo project using React Native technology to create a simple iOS app to find music in iTunes

React Native, native iOS apps with JavaScript iTunesCatalog is a demo app that aims to show the React Native platform potential. There are included th

iOS Application that gets the trending repositories data from Github API and displays it in a tableView.

Github-Trending-Repos iOS Application that gets the trending repositories data from Github API and displays it in a tableView. Follows MVC architectur

Code Swift iOS app showcasing basic movies list from Orange TV API.

iOS Code Test - Optiva Media Code Swift iOS app showcasing basic movies list from Orange TV API. Built using XCode 13.0 (Swift 5) How to run the examp

The Feed API challenge with swift
The Feed API challenge with swift

The Feed API challenge - iOSLeadEssentials.com It's time to put your skills to the test! You are called to implement the RemoteFeedLoader to load a co

Flix is an app that allows users to browse movies from the The Movie Database API.
Flix is an app that allows users to browse movies from the The Movie Database API.

Flix is an app that allows users to browse movies from the The Movie Database API.

iOS App showing a list of Top Movies from The Movie Database API, with a movies searcher

TMDBTest App para iOS que muestra un listado de películas destacadas haciendo uso de la API de "The Movie Database". Además la app dispone de un busca

An app that allows users to browse movies from the The Movie Database API
An app that allows users to browse movies from the The Movie Database API

Flix Flix is an app that allows users to browse movies from the The Movie Database API. 📝 NOTE - PASTE PART 2 SNIPPET HERE: Paste the README template

Challenge-M2Y-TM4 - A challenge provided by Mobile2You, with the purpose of analyzing knowledge about UI, API consumption
Challenge-M2Y-TM4 - A challenge provided by Mobile2You, with the purpose of analyzing knowledge about UI, API consumption

Challenge-M2Y-TM4 Um desafio proporcionado pela Mobile2You, com proposito de ana

Flix - an app that allows users to browse movies from the The Movie Database API
Flix - an app that allows users to browse movies from the The Movie Database API

Flix Flix is an app that allows users to browse movies from the The Movie Database API. Flix Part 2 User Stories REQUIRED (10pts) (5pts) User can tap

Releases(1.0.4)
Owner
Allike
Allike app on iOS
Allike
AR Image Finder for MDA

AR-Imge-Finder AR Image Finder for MDA Installation Clone the project in Xcode 1

null 0 Dec 19, 2021
iOS App that browse the people from Star Wars Universe using GraphQL Api.

Ravn-Challenge-V2--OscarCastillo- iOS App that browse the people from Star Wars Universe using GraphQL Api. This project uses Apollo swift Client. htt

Oscar Castillo 4 Jun 9, 2021
ITunesSearchApiDemo - A demo for using iTunes Search API

iTunesSearchApiDemo This is a demo for using iTunes Search API. For more informa

Gokhan Mutlu 0 Jan 26, 2022
Demo of a simple ASP.NET Core web API written in Swift

Welcome! This repo is a demo which shows the use of Llama Swift with ASP.NET Core. Llama is my exploratory project to compile "other languages" for .N

Eric Sink 14 Mar 2, 2022
A simple application display album artwork from the iTunes API

iTunesTestApp In the test task, you need to develop a simple application for the iPhone. The application should display album artwork from the iTunes

Valery Veselov 1 Nov 2, 2021
PushDispatcher-vapor - Simple Api to dispatch push to APNS with p8 file

PushDispatcher - Vapor The purpose of this application is to facilitate the test

Michel Anderson Lütz Teixeira 3 Oct 18, 2022
AnimeSearch - A simple app that shows how to use Anilist GraphQL based API with Apollo

AnimeSearch A simple app that shows how to use Anilist GraphQL based API with Ap

Pedro J Fernandez 1 Apr 26, 2022
Here there is a simple example using watchOS and SwiftUI

A Simple Demonstration Project using WatchOS + SwiftUI Description This project is a simple demonstration about how to create a WatchOS App using Swif

Leandro Alves da Silva 1 Jul 19, 2022