Skip to content

Instantly share code, notes, and snippets.

@esseguin
Created September 22, 2012 01:04
Show Gist options
  • Save esseguin/3764745 to your computer and use it in GitHub Desktop.
Save esseguin/3764745 to your computer and use it in GitHub Desktop.
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