Oyster Harvest Area Closure Analysis 0.1
Prediction and analysis of NSW oyster harvest area closures.
Loading...
Searching...
No Matches
location.c File Reference
Include dependency graph for location.c:

Functions

CURLcode WillyWeather_GetLocationByName (char *name, WW_Location_TypeDef *location_info)
 Get an ID describing a location from Willy Weather. More...
 

Function Documentation

◆ WillyWeather_GetLocationByName()

CURLcode WillyWeather_GetLocationByName ( char *  name,
WW_Location_TypeDef location_info 
)

Get an ID describing a location from Willy Weather.

Get location ID from Willy Weather.

Willy Weather forecast requires a location ID. This is obtained by querying by name (e.g. Batemans Bay). The response contains cJSON data of which multiple sites can be obatined (limited through q_limit).

WW_Location_TypeDef *location_info;
WillyWeather_GetLocationByName("Batemans Bay", location_info);
CURLcode WillyWeather_GetLocationByName(char *name, WW_Location_TypeDef *location_info)
Get an ID describing a location from Willy Weather.
Definition: location.c:26
Location data from Willy Weather request.
Definition: location.h:24
See also
https://www.willyweather.com.au/api/docs/v2.html#location-get-search-by-query

@info Name can contain spaces. These are encoded as "%20". @info Response length is limited to one as to ensure only one location is returned per query.

Parameters
nameName to query against.
location_infoLocation structure to populate.
Returns
The result status code provided by CURL.