|
Oyster Harvest Area Closure Analysis 0.1
Prediction and analysis of NSW oyster harvest area closures.
|
#include <string.h>#include <stdlib.h>#include <stdio.h>#include <math.h>#include <cjson/cJSON.h>#include <curl/curl.h>#include <log.h>#include "WillyWeather/authenticate.h"#include "http.h"#include "utils.h"Go to the source code of this file.
Data Structures | |
| struct | WW_Location_TypeDef |
| Location data from Willy Weather request. More... | |
| struct | WW_Locations_TypeDef |
| Locations of Willy Weather stations. More... | |
Macros | |
| #define | WW_LOCATION_BUF 150 |
| Buffer for location information. More... | |
| #define | WW_LOCATION_URL_BUF 200 |
| Buffer for request location URL. More... | |
| #define | WW_MAX_NUM_LOCATONS 100 |
| Max number of locations in buffer. More... | |
Functions | |
| CURLcode | WillyWeather_GetLocationByName (char *name, WW_Location_TypeDef *location_info) |
| Get an ID describing a location from Willy Weather. More... | |
| #define WW_LOCATION_BUF 150 |
Buffer for location information.
| #define WW_LOCATION_URL_BUF 200 |
Buffer for request location URL.
| #define WW_MAX_NUM_LOCATONS 100 |
Max number of locations in buffer.
| 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).
@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.
| name | Name to query against. |
| location_info | Location structure to populate. |