Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Replace serde_urlencoded with serde_qs. | Harald Eilertsen | 2020-01-01 | 6 | -36/+24 |
| | | | | Simplifies serialization of various types quite a bit. | ||||
* | Update deps. | Harald Eilertsen | 2020-01-01 | 2 | -3/+3 |
| | |||||
* | tests: Verify authorization properly. | Harald Eilertsen | 2020-01-01 | 2 | -15/+15 |
| | |||||
* | Update to Mockito 0.19 for smoother tests. | Harald Eilertsen | 2019-07-29 | 2 | -13/+12 |
| | | | | | Provides matching against query params, so we don't need the ugly regexes anymore. | ||||
* | Abstract away type of stored data in an Item. | Harald Eilertsen | 2019-07-29 | 2 | -4/+38 |
| | | | | | Currently this seems rather pointless, but will make more sense when we need to store arrays in the Item data set. | ||||
* | Reduce duplication in tests. | Harald Eilertsen | 2019-06-12 | 1 | -84/+35 |
| | | | | | Adds a default_mock method for most cases, and a client method that sets up the zotapi client with the proper test url and credentials. | ||||
* | Add a bit of doc to the ItemBuilder struct. | Harald Eilertsen | 2019-06-12 | 1 | -0/+17 |
| | |||||
* | Make Error type public. | Harald Eilertsen | 2019-06-12 | 1 | -0/+1 |
| | |||||
* | zotcli: Handle attaching media to posts. | Harald Eilertsen | 2019-06-12 | 2 | -1/+7 |
| | |||||
* | Fix uploading of attachments to posts. | Harald Eilertsen | 2019-06-12 | 2 | -31/+29 |
| | | | | | | | The field needs to be named `media`, and we also need to handle the result of the operation. This refactors the result handling into a separate private function. | ||||
* | zotcli: Fetch group members by group id or group name. | Harald Eilertsen | 2019-06-10 | 2 | -4/+57 |
| | |||||
* | Implement fetching privacy group members. | Harald Eilertsen | 2019-06-10 | 3 | -2/+83 |
| | |||||
* | zotcli: Make group formatting work and print flags. | Harald Eilertsen | 2019-06-10 | 1 | -5/+20 |
| | | | | | Formatting requires the format arguments to be proper strings or integers. Formatting a serde_json::Value directly did not work. | ||||
* | Fetch privacy groups. | Harald Eilertsen | 2019-06-09 | 7 | -0/+106 |
| | |||||
* | zotcli can now post messages with titles. | Harald Eilertsen | 2019-06-09 | 2 | -4/+11 |
| | |||||
* | Use clap_app macro to define args at compile time. | Harald Eilertsen | 2019-06-09 | 2 | -58/+38 |
| | | | | | | For some reason the clap_app macro does not accept subcommands with hyphens, so the subcommands `channel-strean` and `network-stream` has been changed to `channel` and `network` respectively. | ||||
* | Use rust edition 2018. | Harald Eilertsen | 2019-06-09 | 6 | -13/+24 |
| | |||||
* | Add test for uploading two files. | Harald Eilertsen | 2018-12-16 | 1 | -0/+37 |
| | |||||
* | Upload one file should now work. | Harald Eilertsen | 2018-12-16 | 3 | -7/+27 |
| | |||||
* | Begin multipart/form-data upload support. | Harald Eilertsen | 2018-11-19 | 3 | -1/+51 |
| | |||||
* | Update to mockito 0.14. | Harald Eilertsen | 2018-11-19 | 1 | -1/+1 |
| | |||||
* | Merge branch 'rewrite-examples' | Harald Eilertsen | 2018-11-06 | 16 | -299/+508 |
|\ | |||||
| * | Clear out old example code.rewrite-examples | Harald Eilertsen | 2018-11-06 | 6 | -298/+0 |
| | | |||||
| * | Move abconfig example to new example app. | Harald Eilertsen | 2018-11-06 | 3 | -0/+36 |
| | | |||||
| * | Move the post new item example code to new example app. | Harald Eilertsen | 2018-11-06 | 3 | -0/+40 |
| | | |||||
| * | Import macros explicitly in zot cli example. | Harald Eilertsen | 2018-10-28 | 1 | -2/+9 |
| | | | | | | | | This requires rust 1.30.0 or later. | ||||
| * | Move zot cli example modules into submodule. | Harald Eilertsen | 2018-10-28 | 6 | -11/+12 |
| | | | | | | | | Also rename example from zot to zotcli to avoid name clash. | ||||
| * | Add fetching xchans to main sample. | Harald Eilertsen | 2018-10-09 | 2 | -0/+74 |
| | | |||||
| * | Add abook api to main example. | Harald Eilertsen | 2018-10-08 | 2 | -0/+63 |
| | | |||||
| * | Add fetching network_stream to main example. | Harald Eilertsen | 2018-10-08 | 2 | -1/+123 |
| | | | | | | | | | | This duplicates a lot of the code from the channel_stream example, will try to refactor later. | ||||
| * | Differ between different type of tags in channel_stream example. | Harald Eilertsen | 2018-10-08 | 1 | -3/+11 |
| | | |||||
| * | Expand channel_stream to output items as on the web. | Harald Eilertsen | 2018-10-07 | 1 | -3/+52 |
| | | |||||
| * | Add new "master" example, to contain all examples as subcommands. | Harald Eilertsen | 2018-09-24 | 3 | -0/+107 |
| | | | | | | | | Only implements fetching the channel-stream for now. | ||||
| * | Export zotapi::Client | Harald Eilertsen | 2018-09-24 | 1 | -1/+1 |
|/ | |||||
* | Drop unused variables from examples. | Harald Eilertsen | 2018-09-23 | 2 | -4/+0 |
| | |||||
* | Begin implement undocumented abconfig API. | Harald Eilertsen | 2018-09-23 | 5 | -0/+97 |
| | |||||
* | Add example for fetching abook data. | Harald Eilertsen | 2018-09-23 | 1 | -0/+55 |
| | |||||
* | Begin implementaton of undocumented abook api to fetch connections. | Harald Eilertsen | 2018-09-23 | 4 | -0/+55 |
| | |||||
* | Upgrade dep reqwest to 0.9.1. | Harald Eilertsen | 2018-09-22 | 2 | -10/+9 |
| | |||||
* | Use enum instead of BTreeMap to select xchan. | Harald Eilertsen | 2018-08-23 | 1 | -7/+26 |
| | | | | | | | | | Since it only makes sence to fetch an xchan by one of the methods (address, hash or guid) we don't need a data type that can hold more than one value. Had to implement my own serializer for it, since serde_urlencoded don't know how to serialize enums by default. | ||||
* | Add fetching xchans by guid and has too. | Harald Eilertsen | 2018-08-23 | 2 | -0/+38 |
| | |||||
* | Add example for fetching xchan data by address. | Harald Eilertsen | 2018-08-22 | 1 | -0/+50 |
| | |||||
* | Add support for fetching xchan data by address. | Harald Eilertsen | 2018-08-21 | 5 | -9/+88 |
| | | | | | | | Not entirely happy with it, have updated the signature of Client::fetch_stream and Client::url to take args, which are left out if they're not serializable (or empty, I hope.) Should probably use an Option instead, or maybe even two entry points for the api. | ||||
* | Allow setting title for new items. | Harald Eilertsen | 2018-08-20 | 2 | -4/+32 |
| | |||||
* | Refactoring: Split into submodules. | Harald Eilertsen | 2018-08-20 | 4 | -123/+187 |
| | |||||
* | Refactoring: Make Client::post_data helper. | Harald Eilertsen | 2018-08-20 | 2 | -17/+26 |
| | | | | | This means we don't need to access internal data members of the Client in builder structs an the like. | ||||
* | Remove create_item API. | Harald Eilertsen | 2018-08-20 | 2 | -21/+1 |
| | |||||
* | Use builder pattern to construct items. | Harald Eilertsen | 2018-08-20 | 2 | -1/+43 |
| | |||||
* | Add simple example to post a message. | Harald Eilertsen | 2018-08-19 | 1 | -0/+47 |
| | |||||
* | First attempt at creating posts. | Harald Eilertsen | 2018-08-19 | 2 | -1/+38 |
| |