Windy Community
    • Unread
    • Categories
    • Groups
    • Go to windy.com
    • Register
    • Login

    Load our meteorological data into your Windy Plugin

    Windy Plugins
    7
    17
    4.1k
    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.
    • ivoI
      ivo Administrator
      last edited by marekd

      _center_shadow

      Finally it is here

      To use our backend data inside your plugin use our new @windy/plugins/plugin-data-loader module as described here on GitHub

      The example can be found here

      Please limit your requests to maximim 3 rqsts per second otherwise we will have to use rate limiter on backend side. Also bear in mind, that due to the strict licence conditions, any data retrieved from our backend API, MUST run on windy.com domain only.

      1 Reply Last reply Reply Quote 2
      • jakubvranaJ
        jakubvrana | Premium
        last edited by jakubvrana

        @ivo, this stopped working today around 11:40:

        “tinyrequire DI error: Can not resolve @plugins/windy-plugin-pg-mapa module Error: Tinyrequire error: Module "pluginDataLoader" does not exist!”

        37335e97-0137-40bc-a5fb-633dd01dd9f8-image.png

        Also, would be possible to return the data in 1-hour resolution for premium users?

        1 Reply Last reply Reply Quote 0
        • jakubvranaJ
          jakubvrana | Premium
          last edited by

          This seems to be renamed to @windy/@plugins/plugin-data-loader. Is this change permanent or is it a bug? If permanent then please fix the docs and examples but I'd suggest keeping the original name.

          rittelsR 1 Reply Last reply Reply Quote 1
          • rittelsR
            rittels Code contributor @jakubvrana | Premium
            last edited by rittels

            @jakubvrana, @marekd and @ivo

            import dataLoader from "@windy/@plugins/plugin-data-loader";

            works, thanks.

            This follows a big upgrade, v27.

            Modules with camelCase becomes xxx-xxx, and the ones residing in W.plugins, are imported as you described: import xxx from "@windy/@plugins/xxx-xxx".

            1 Reply Last reply Reply Quote 0
            • marekdM
              marekd Administrator
              last edited by marekd

              @jakubvrana @rittels It is not on purpose. We made some internal building changes into client version 27. And we have forgotten about external plugins... Sorry about that and thanks for reporting!

              1 Reply Last reply Reply Quote 2
              • marekdM
                marekd Administrator
                last edited by marekd

                @jakubvrana Ok, we fixed it with @rittels . Please, use @windy/plugins/plugin-data-loader for importing data loader. Also, make sure you have an updated version of compiler.js (https://github.com/windycom/windy-plugins/blob/master/compiler.js) in your plugins root.

                Sorry about that, big changes bring errors sometimes :-) I will update docs soon.

                1 Reply Last reply Reply Quote 1
                • MarkRDM
                  MarkRD
                  last edited by

                  Could this issue raised by @jakubvrana also cause problems with @johnckealy's skewt plugin?

                  The skewt plugin was working for me earlier today but then started producing the following error:
                  DI error: Can not resolve @plugins/windy-plugin-skewt module: Tinyrequire error: Module "pluginDataLoader" does not exist!

                  Same error on different browsers (Chrome, Safari, Edge) and different machines.

                  rittelsR 1 Reply Last reply Reply Quote 0
                  • rittelsR
                    rittels Code contributor @MarkRD | Premium
                    last edited by

                    @MarkRD

                    @johnckealy @vicb @jacobsjo

                    Yes. Many of plugins will be offline until we update our code.

                    1 Reply Last reply Reply Quote 1
                    • vicbV
                      vicb Paraglider | Premium
                      last edited by

                      @rittels @marekd

                      Thanks for the notification. I'll update my plugin.

                      I am not using compiler.js (because it has too many limitations for my use case). So could you please describe the differences ?

                      Is it that plugin should be imported from @plugins/{name} ?

                      ie W.require("pluginDataLoader") should be changed to W.require("plugin-data-loader")

                      Many of plugins will be offline until we update our code.

                      What does that mean ? When can I try the updated version ?

                      vicbV 1 Reply Last reply Reply Quote 0
                      • vicbV
                        vicb Paraglider @vicb | Premium
                        last edited by

                        I had the following code

                          plugins["detail-render"].load().then(() => {
                            W.define("meteogram-ext", ["meteogram", "Class"], function(m, c) {
                              return c.extend(m, {
                                legend: () => this,
                              });
                            });
                            store.dispatch(soundingAct.setMeteogram(W.require("meteogram-ext")));
                          });
                        

                        which does not work if I replace "detail-render" with "@plugins/detail-render" any hit ?

                        The error is an not resolve @plugins/windy-plugin-sounding module TypeError: Cannot read property 'load' of undefined

                        rittelsR 1 Reply Last reply Reply Quote 0
                        • vicbV
                          vicb Paraglider | Premium
                          last edited by

                          @rittels

                          I think by "offline" you actually meant "broken".
                          I have published 1.1.8 that fixes it.

                          @marekd

                          I was actually using the meteogram to get the rain cloud cover.
                          I did that by trapping inside the meteogram canvas and check the color...

                          I would be great if you provide and API to get the rain cloud cover at a given time and altitude - or make that part of the loadable data.

                          Do you think this is possible ?

                          rittelsR 1 Reply Last reply Reply Quote 0
                          • marekdM
                            marekd Administrator
                            last edited by marekd

                            We changed package path naming in a client version 27.

                            • @windy/* packages are from client core (shared components across the whole client, important for initializing and basic functionality) - but this namespace is traspiled during build to "old style" for some reason!
                            • @plugins/* packages are all plugins (eg. plugin-data-loader)
                            • no namespace is used for requiring local modules

                            Also we switched from camelCase to kebab-case.

                            So @vicb if you are using W.require directly without our compiler, I would recommend you to check the content of W.modules on windy.com.

                            1 Reply Last reply Reply Quote 1
                            • rittelsR
                              rittels Code contributor @vicb | Premium
                              last edited by

                              @vicb @johnckealy @marekd

                              var pluginDataLoader = W.require('@plugins/plugin-data-loader');

                              1 Reply Last reply Reply Quote 1
                              • rittelsR
                                rittels Code contributor @vicb | Premium
                                last edited by

                                @vicb I think if you access the plugins directly, thus not importing (or requiring), then it is still W.plugins['detail-render'].

                                vicbV 1 Reply Last reply Reply Quote 0
                                • vicbV
                                  vicb Paraglider @rittels | Premium
                                  last edited by

                                  @rittels @marekd Thanks for all the info

                                  (Yes it is definitely plugins["detail-render"] to access the plugin).

                                  1 Reply Last reply Reply Quote 1
                                  • jakubvranaJ
                                    jakubvrana | Premium
                                    last edited by

                                    @marekd, thanks for the update. Backwards compatibility is sacred for me so I'm surprised that you break it just to change a name, especially if there are official docs and examples around. I can understand that this was an omission but I don't understand not reverting it once reported. Can you please at least keep both names? (I don't know if some kind of aliases are possible here.)

                                    1 Reply Last reply Reply Quote 1
                                    • johnckealyJ
                                      johnckealy
                                      last edited by

                                      Thanks for the info all, I've added a patch for SkewT :)

                                      1 Reply Last reply Reply Quote 1
                                      • First post
                                        Last post
                                      Windyty, S.E. - all rights reserved. Powered by excellent NodeBB
                                      NodeBB & contributors, OSM & contributors, HERE maps
                                      Terms of Use     Privacy Policy