neocitiesd 0.1.0
A library for Neocities written in D
To use this package, put the following dependency into your project's dependencies section:
dub.json
dub.sdl
neocitiesd - A library for Neocities written in D
About
This is a wrapper written in D for the REST API of Neocities.org.
Usage
The following example shows how you can use neocitiesd for managing your website's content in a simple D program.
import neocitiesd;
import std.json;
import std.stdio;
void main() {
auto myNeocities = Neocities("your_user_name", "your_password");
writeln(myNeocities.info.toPrettyString);
writeln(myNeocities.upload(["index.html", "images/photo.jpg"]).toPrettyString);
writeln(myNeocities.list.toPrettyString);
writeln(myNeocities.remove(["index.html", "images/photo.jpg", "images"]).toPrettyString);
writeln(myNeocities.list.toPrettyString);
}
The library offers the four functions info
(information about your site), list
(list of files and directories), upload
(upload files) and remove
(delete files and directories). The response values (HTTP codes etc.) are in JSON format.
License
MIT
- Registered by kambrium
- kambrium/neocitiesd
- MIT
- Copyright © 2017, Martin Muehlbauer
- Authors:
- Martin Muehlbauer
- Dependencies:
- requests
- Versions:
-
0.1.0 2017-May-21 ~master 2017-May-21 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
2 downloads total
-
- Score:
- 0.3