• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

MMM-MealViewer

Scheduled Pinned Locked Moved Development
48 Posts 6 Posters 24.0k Views 6 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    kazanjig
    last edited by Feb 16, 2019, 10:41 PM

    I’m trying to develop a module to get today’s school lunch menu options from my kids’ school. The district uses a service provided by mealviewer.com. The API is available at https://api.mealviewer.com/api/v4/school/[schoolname]/[date range start MM-DD-YYYY]/[date range end MM-DD-YYYY]/. To keep it simple I’m only pulling the current day so the start and end date values are the same.

    Here’s an example: https://api.mealviewer.com/api/v4/school/ElmwoodElementary/02-15-2019/02-15-2019/

    You can see that there is a TON of XML data returned. I’m only interested in the [CafeteriaLine] nodes and each of their respective [FoodItem] nodes and then the respective [Item_Type] and [Item_Name] for each [FoodItem].

    I’m able to send an HTTP request and get (some) data but, unfortunately, most of the nonsense is returned and I don’t see the menu information. It’s like a big chunk out of the middle of the XML data is missing, whether I dump it out to the log before or after parsing it to JSON.

    Any thoughts?

    1 Reply Last reply Reply Quote 0
    • C Offline
      cowboysdude Module Developer
      last edited by Feb 16, 2019, 10:51 PM

      Happy to help… when you have time we can chat.

      M 1 Reply Last reply Feb 17, 2019, 3:07 AM Reply Quote 2
      • M Offline
        Mykle1 Project Sponsor Module Developer @cowboysdude
        last edited by Feb 17, 2019, 3:07 AM

        @cowboysdude said in MMM-MealViewer:

        Happy to help… when you have time we can chat.

        You are in danger of getting a reputation for being a nice guy. ;-)

        Create a working config
        How to add modules

        C 1 Reply Last reply Feb 17, 2019, 3:10 AM Reply Quote 0
        • C Offline
          cowboysdude Module Developer @Mykle1
          last edited by Feb 17, 2019, 3:10 AM

          @mykle1 said in MMM-MealViewer:

          @cowboysdude said in MMM-MealViewer:

          Happy to help… when you have time we can chat.

          You are in danger of getting a reputation for being a nice guy. ;-)

          0_1550373043495_shut-up-you.jpg

          M 1 Reply Last reply Feb 17, 2019, 3:16 AM Reply Quote 1
          • M Offline
            Mykle1 Project Sponsor Module Developer @cowboysdude
            last edited by Feb 17, 2019, 3:16 AM

            @cowboysdude

            0_1550373395899_dr-evil-austin-said-no-memes.jpg

            Create a working config
            How to add modules

            1 Reply Last reply Reply Quote 1
            • C Offline
              cowboysdude Module Developer
              last edited by Feb 17, 2019, 3:19 AM

              0_1550373561202_ce2edd1dff108fb3e574a62c4ab35f39.jpg

              1 Reply Last reply Reply Quote 0
              • K Offline
                kazanjig
                last edited by Feb 17, 2019, 4:19 PM

                .@cowboysdude was exceptionally helpful last night.
                thumbs up

                1 Reply Last reply Reply Quote 1
                • S Offline
                  sdetweil
                  last edited by Feb 17, 2019, 4:32 PM

                  Behave boys! Lol

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  C 1 Reply Last reply Feb 17, 2019, 4:45 PM Reply Quote 1
                  • C Offline
                    cowboysdude Module Developer @sdetweil
                    last edited by Feb 17, 2019, 4:45 PM

                    @sdetweil said in MMM-MealViewer:

                    Behave boys! Lol

                    @sdetweil said in MMM-MealViewer:

                    Behave boys! Lol

                    We try VERY hard LOL

                    1 Reply Last reply Reply Quote 0
                    • K Offline
                      kazanjig
                      last edited by kazanjig Feb 17, 2019, 7:02 PM Feb 17, 2019, 5:59 PM

                      But now I seem to have gotten myself into a pickle. I tried expanding the functionality to add a date range and multiple schools and, of course, I broke it. It’s doing the same thing as before where the ‘cafeteriaLineList’ property is stripped out of the helper results…

                      EDIT:
                      LOL, it’s the weekend and I had it pulling just for today, Sunday. Of course there’s no data. Dumb da dumb dumb…

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 5
                      • 1 / 5
                      1 / 5
                      • First post
                        2/48
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy