Coder Social home page Coder Social logo

evanhsu / mmm-titanschoolmealmenu Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 2.0 3.97 MB

A module for the MagicMirror framework that retrieves a school meal menu from the LinqConnect API (formerly known as the Titan Schools API)

CSS 0.30% JavaScript 99.70%
magicmirror-module magicmirror hacktoberfest

mmm-titanschoolmealmenu's Introduction

Hi there ๐Ÿ‘‹

mmm-titanschoolmealmenu's People

Contributors

evanhsu avatar zanix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mmm-titanschoolmealmenu's Issues

API : ServingSession is Not Breakfast or Lunch

The API for my kids school changed ServingSession to "Seamless Summer Breakfast" and "Seamless Summer Lunch" for some reason. This causes the menu to show as "none".

I changed TitanSchoolsClient.js line 123 to:

const breakfastOrLunch = menuSession.ServingSession.match(/breakfast/i) ? 'breakfast' : 'lunch';

And now the menu shows up again.
I didn't submit a PR because this feels more like a hack than a fix.

This is what the API returns now.

Screenshot-20210927121209-1744x1318

Titan is now Linq Connect and API URL Changed

Titan changed both the name of the site (now Linq Connect) and the API URL

The new API URL is

https://api.titank12.com/api/

Everything else seems to have stayed the same, including district and building IDs.

Only show meals that are in the future

Current behavior

The menu for "today" is shown all day (until midnight). When the numberOfDaysToDisplay config option is set to 1, this typically isn't the info that you're interested in (meals that already happened).

Desired behavior

When the numberOfDaysToDisplay config option is set to 1, the menu for "today" should be shown until lunchtime has ended, then the menu for tomorrow should be shown instead. We could probably switch to "tomorrow's" menu at 2pm local time.

When the numberOfDaysToDisplay config option is set to something greater than 1, we should preserve existing behavior (today's menu is shown until midnight)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.