Skip to content

Weather app needs a fix to a query parameter #94

Description

@cryptorick

First, @kendru thank you for writing this book and it has been a blessing to me so far as I learn cljs.

Now, on to the issue. It's quite simple really.

The book has q as the query parameter that takes the zip code value for the openweathermap API (v2.5) calls. But the query parameter should be zip.

To consult the API documentation to confirm this (so that you don't take my work for it), go to https://openweathermap.org/forecast5#zip5.

Besides that, I really discovered this when running the app: q=22202 (btw, 22202 being a zip code in Arlington, Virginia, USA) was giving me weather for some place in Croatia. And simply changing q to zip in the code yielded Arlington's temperatures in the page on the next call.

(The value for q, according to the API docs, should be "City name, state code and country code divided by comma, use ISO 3166 country codes.")

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions