API Overview
The Simcoe Weather API allows you to call methods that respond in
REST style xml. Individual
methods are detailed in the menu on the left.
Generally speaking, you will send a method parameter expressed as "simcoeweather.package.method" along with method specific arguments to the root URL.
Note:
» Please use an identifiable User-Agent header on all requests. Like this you dont risk getting banned and it helps our logging.
» Use common sense when deciding how many calls to make. For example, if youre making a web application, try not to hit the API on page load. You account may be suspended if your application is continuously making several calls per second.
» Everybody has a
rate limit of 1500 requests per hour. If you go higher than that, you will receive error messages.
Encoding
Use
UTF-8 encoding when sending arguments to API methods.
Rest Responses
Responses will be wrapped in an sw status node.
<sw status="$status" code="$code">
...
</sw>
Where $status is either ok or error and $error is the error code. If the status is error youll get an error code and message.
Error Responses
See the individual method call pages for service specific error codes. Errors will communicate a code and a message in the following format:
<sw status="error" code="40">
<message>Invalid Method</message>
</sw>
JSON Responses
Other than XML you can request API responses in JSON format. All you need to do is to set the
format parameter as "json". If you have selected the json format you can also use the
callback parameter to use it as a callback function name which will wrap the JSON response.
The response is a translation of the XML response format, converted according to the following rules:
» Attributes are expressed as string member values with the attribute name as key.
» Element child nodes are expressed as object members values with the node name as key.
» Repeated child nodes will be grouped as an array member with the shared node name as key.
Discussion
Join the
Developer Group group on Google Groups to receive notifications about new Web Services, access to beta APIs, provide feedback and discuss development with other developers.