Skip to content

Instantly share code, notes, and snippets.

@esseguin
Created September 22, 2012 01:28
Show Gist options
  • Save esseguin/3764801 to your computer and use it in GitHub Desktop.
Save esseguin/3764801 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")
def parse_result(response):
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
# Invoke the method and get back the MashapeResponse object
obj.getForecasts("San Francisco", parse_result)
print "waiting!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment