Created
September 22, 2012 01:04
-
-
Save esseguin/3764745 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from Weather import Weather | |
# Initialize the client object with your Mashape public and private keys. | |
obj = Weather("YOUR_PUBLIC_KEY", "YOUR_PRIVATE_KEY") | |
# Invoke the method and get back the MashapeResponse object | |
response = obj.getForecasts("San Francisco") | |
# The MashapeResponse has the following properties that you can use | |
print response.code # http status code | |
print response.headers # string response headers | |
print response.raw_body # raw string response body | |
print response.body # parsed response body |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment