Created
September 21, 2012 22:38
-
-
Save esseguin/3764331 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
<?php | |
require_once("Weather.php"); | |
// Initialize the client object with your Mashape public and private keys. | |
$obj = new 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 "Status Code: $response->code"; // Integer status code | |
var_dump($response->headers); // Response headers as an array | |
print "Raw Body: $response->rawBody"; // String raw body of the response | |
var_dump($response->body); // stdClass object of parsed response body | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment