#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <cjson/cJSON.h>
#include <curl/curl.h>
#include <log.h>
#include "http.h"
Go to the source code of this file.
◆ WW_DEFAULT_ENV_NAME
| #define WW_DEFAULT_ENV_NAME "WW_TOKEN" |
Willy weather default environmental variable name.
◆ WW_TOKEN_SIZE
| #define WW_TOKEN_SIZE 100 |
Willy weather access token size.
◆ WillyWeather_CheckAccess()
| uint8_t WillyWeather_CheckAccess |
( |
void |
| ) |
|
Check API token is initialised and available for use.
Check Willy Weather API token has been initialised.
- Returns
- Integer representing access state (0 = success)
◆ WillyWeather_GetToken()
| uint8_t WillyWeather_GetToken |
( |
const char * |
env_var_name | ) |
|
Get Willy Weather API token from environment variable.
Obtain and populate Willy Weather access token from environment variable.
- Parameters
-
| env_var_name | Name of environment variable where token is held. |
- Returns
- Integer representing
◆ WW_TOKEN