Minimal, secure C wrapper for the Neocities API.
- Site info retrieval
- File listing
- Upload files
- Delete files
- Get API key
- TLS verification enabled by default
- libcurl
Linux (example):
sudo apt install libcurl4-openssl-dev
int neocities_info(const char *sitename, char **out);Fetch metadata about a site.
int neocities_list(const char *api_key, const char *path, char** out);List files at a path.
int neocities_upload(const char *api_key, const char **local_files, const char **remote_names, size_t count, char **response);Uploads multiple files.
local_files[i]→ local pathremote_names[i]→ remote filename
int neocities_delete(const char *api_key, const char **filenames, size_t count, char **response);Deletes files from the site.
int neocities_apikey(const char *user, const char *pass, char **out);Get your API key.
See example.c