dakboard / Cloud-Platform

Feature requests, enhancements and anything you'd like to see in DAKboard!
https://dakboard.com
168 stars 39 forks source link

Sycamore School Lunch Integration #1740

Closed Dan-Peck closed 1 year ago

Dan-Peck commented 1 year ago

Discussed in https://github.com/dakboard/Cloud-Platform/discussions/1674

Originally posted by **russStarr** November 25, 2022 ### Synopsis I stumbled across #1484 and I have another idea for school lunch information. My kids school leverages Sycamore. I already created an integration leveraging both images and HTML/iframe data. This has proven to be somewhat fragile and I thought a native integration would be very feasible. The rest of this post will contain information about the API and what a possible user story would look like for this integration. Do you have an SDK that folks in the community can leverage to contribute 3rd party integrations like this? ### Sycamore Platform - [Sycamore School API Documentation](https://github.com/SycamoreEducation/SycamoreSchoolAPI) - [API Sandbox](https://app.sycamoreschool.com/oauth/sandbox/index.php) ### Example User Story As a parent of kids who attend a school leveraging the Sycamore school management platform, I would like to retrieve the provided Lunch menu data to populate my DAKboard with relevant food information so my kids know whether they need to pack their own lunch. This is a very specific user story, however I imagine there are use cases for food allergies as well. ### Accessing the Sycamore API As a parent, I can login to my Sycamore account and generate a new access token. This Bearer access token can be used to access the lunch menu. Here is an example set of provided user inputs (as Bash variables) and the API request with curl: ``` SYCAMORE_ACCESS_TOKEN="abc....123" SYCAMORE_SCHOOL_ID="123456789" curl -H "Accept: application/json" -H "Authorization: Bearer ${SYCAMORE_ACCESS_TOKEN}" https://app.sycamoreschool.com/api/v1/School/${SYCAMORE_SCHOOL_ID}/Cafeteria ``` School lunch provided: (prettified for readability) ```json { "11/28/2022": [ { "MealID": 2974, "MealName": "Chicken Sandwich #2", "MealDesc": "Tater Tots\r\nFruit\r\nDessert" } ], "11/29/2022": [ { "MealID": 7005, "MealName": "Cheese/Beef Nachos", "MealDesc": "Fruit\r\nYogurt\r\nDessert" } ], "11/30/2022": [ { "MealID": 7009, "MealName": "Chicken Tenders", "MealDesc": "Chips\r\nFruit\r\nDessert" } ] } ``` ### DAKBoard Integration Today I have a very simple Google Cloud Function that pulls the data and I can inject that into an iFrame on the DAKboard. This works but I have code to maintain and it lacks extensibility provided by the API and doesn't easily allow updating colors or other basic settings provided by most DAKBoard blocks. The [Cafeteria endpoint](https://github.com/SycamoreEducation/SycamoreSchoolAPI/blob/master/Endpoints/School/Cafeteria.md) takes other parameters that would be nice for users to customize, including limit, start date, and end date.
Dan-Peck commented 1 year ago

Due to issue working with the Sycamore School Development Portal, and lack of an account with a School ID to authorize with, and no test data to work with, this effort is currently paused, pending Sycamore response and/or customer volunteering a token for betatesting (see Discussion for more info).

cocarrig commented 1 year ago

Update: Since there has been no response from the client, we are closing this effort incomplete.