Skip to content

Serverless API that grabs bryant park free ice skating sessions along with the number of slots. Currently invoked using Siri Shortcuts.

Notifications You must be signed in to change notification settings

andrewwong97/bp-skate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

Basic Go serverless API that grabs bryant park free ice skating sessions along with the number of slots. Deployed on Vercel.

Deployment Configuration

I'm currently deploying the logic as a Go lambda on Vercel, which is called by the Apple Shortcuts "Get Content" API.

Request flow: User invokes Siri Shortcut, provides date. Apple Shortcut passes the date as a request header to the API host and endpoint. The lambda receives this request, and uses the date header in its call to the Bryant Park API. The lambda reads the BP API response, and sends a plaintext response to Apple Shortcuts, which then displays the formatted text for Siri to read.

Prod Usage

I'm currently limiting access of the API due to rate limiting issues. If you need access, please file a ticket in the Issues tab.

Running in Dev Mode

You can test the functionality of the outbound request using the legacy Python code by moving legacy-index.py from root to api/ folder (maybe have to delete or temporarily move index.go). Currently there is no way to test the Go code besides deploying to staging.

npm i -g vercel
vercel dev

Your Python API is now available at http://localhost:3000/api.

Creating the Apple Shortcut to call this API

IMG_4396

About

Serverless API that grabs bryant park free ice skating sessions along with the number of slots. Currently invoked using Siri Shortcuts.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published