Created
September 22, 2012 01:28
-
-
Save esseguin/3764801 to your computer and use it in GitHub Desktop.
This file contains 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") | |
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