Giter Site home page Giter Site logo

Comments (2)

tipichris avatar tipichris commented on July 20, 2024

Wunderground's API returns three URLs

forecast_url: http://www.wunderground.com/US/MD/Columbia.html
history_url: http://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=KMDCOLUM3
ob_url: http://www.wunderground.com/cgi-bin/findweather/getForecast?query=39.196098,-76.796097

The desklet uses the forecast_url, on the assumption that most users are more interested in the future weather than the past weather. Unfortunately the API does not return a URL for the forecast for the PWS. Obviously in this case it would be relatively trivial to construct the URL you are after, but unfortunately the way in which WU constructs URLs is not consistent across countries, and does not appear to be documented. The structure of URLs for my local PWS of IWARWICK37 differs markedly, for example. The desklet therefore needs to rely on the URLs reported by the API. It's unlikely that this issue will be resolved unless

  • WU change their API and start reporting the station URL
  • You (or someone) can find a consistent and reliable way to construct the necessary URL from data available to the desklet (essentially the station ID, and the URLs reported by WU's API)
  • You can convince me that it makes more sense to use the history URL than the forecast URL, which doesn't appear to be what you're requesting. However, it is only one click from the PWS history to the PWS forecast, and that behaviour appears to be consistent.

from cinnamon-spices-desklets.

tomkiti avatar tomkiti commented on July 20, 2024

Wow, what a horrible API! I tried everything I could think of, but I agree that there's no easy way to get the PWS URL using the API. Even the 3 URLs that are returned point to 3 different PWSs! The current behaviour is definitely sufficient. Thanks for looking into it.

from cinnamon-spices-desklets.

Related Issues (20)

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.