Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Read the guide here and complete the registration process. You can use their free service, so you don't need to pay anything. This web service

  1. Read the guide here and complete the registration process. You can use their free service, so you don't need to pay anything.
  2. This web service requires an API Token. After you sign up, view your default API key here. You will need this key to communicate with the API from PowerShell. (API Token is synonymous with API Key).

Here are the components of the script you should build:

  • Use the Current Weather Data endpoint using ZIP code (30912) and country code (US).

  • You will need to use a custom header [reference1 reference2]. Note there are a couple of ways to do this (2 ways, 2 references). Either will work, just don't mix the two together.

  • The header field name you need to use is token and the value is your API key

  • Save the response of your API call to the variable $weather

  • Pipe $weather to Select-Object -ExpandProperty main to see the current temperature in the temp field in degrees Kelvin. Note that the property main is just the name of the node we care about in the return JSON data.

  • The output in your screen shot needs to be clearly labeled so as to see the temperature value and temp field name.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intranet And Web Databases For Dummies

Authors: Paul Litwin

1st Edition

0764502212, 9780764502217

More Books

Students also viewed these Databases questions