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 newsapi help

    Scheduled Pinned Locked Moved Solved Troubleshooting
    11 Posts 4 Posters 6.0k Views 4 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.
    • mumblebajM Offline
      mumblebaj Module Developer @1a2a3a
      last edited by

      @1a2a3a Yeah, unfortunately it would mean a bit of a re-write to perform multiple calls per country but that would mean your call limit would get finished much much quicker.

      Check out my modules at: https://github.com/mumblebaj?tab=repositories
      Check my blog-post: https://mumblebaj.xyz/

      S 1 2 Replies Last reply Reply Quote 0
      • S Offline
        sdetweil @1a2a3a
        last edited by

        @1a2a3a this modules doesn’t support multiple instances.

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • S Offline
          sdetweil @mumblebaj
          last edited by

          @mumblebaj and if multiple instances same problem

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 1
          • 1 Offline
            1a2a3a @mumblebaj
            last edited by 1a2a3a

            @mumblebaj i cant get my newsapi to work properly.

            im trying to get SG all news. i set country to SG but its return other country news like 1News, AZoM. i dont understand why?

            {
                           module: "MMM-NewsAPI",
                           header: "News",
                           position: "top_center",
                           config: {
                                   apiKey: "12345",
                                   type: "horizontal",
                                   choice: "headlines",
                                   pageSize: 50,
                                   
                                   drawInterval: 1000*30,
                                   templateFile: "template.html",
                                   fetchInterval: 1000*60*60,
                                   QRCode: true,
                                   query: {
                                           country: "sg",
               			
               			category: "",
               			
               			
                                           source: "",
                                           domains: "",
                                           excludeDomains: "",
                                           language: "en",
                                   }
                           }
                   },
            
            M 1 Reply Last reply Reply Quote 0
            • M Offline
              MMRIZE @1a2a3a
              last edited by MMRIZE

              @1a2a3a

              When you set choices:'headlines' and query.country: 'sg', it doesn’t mean news from Singapore press. Rather, it would be more similar to About/For Singapore or Popular in Singapore.

              Usually for news from Specific national press, sources: [...] would be used.
              For example;

              sources: ['bild', 'die-zeit'], 
              

              will show the news from the specific sources of Germany.

              You can check sources by nation like this by yourself.

              # Open your browser then navigate to here;
              https://newsapi.org/v2/top-headlines/sources?country=de&apiKey=YOUR_API_KEY
              

              a846d5ff-f7ae-4b9f-b36c-31e5fec90de8-image.png

              But unfortunately, For Singapore, there is no registered national source for this API.
              fdc62d89-c3b5-41dd-a6ed-9e93f075af96-image.png

              It means even though this NewsAPI collects the news from various sources, you cannot specify the sources from only Singapore. You are not alone. For many countries, the API doesn’t provide the national source.

              1 1 Reply Last reply Reply Quote 1
              • 1 Offline
                1a2a3a @MMRIZE
                last edited by

                @MMRIZE thanks for the explanation. do you have other news module to recommend?

                1 Reply Last reply Reply Quote 0
                • 1
                • 2
                • 1 / 2
                • First post
                  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