aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* tests: Make default mock return empty array.Harald Eilertsen2020-02-141-1/+1
| | | | Most API's return an arrya, so this should be ok with most of them.
* tests: No need to check response returned by mock.Harald Eilertsen2020-02-141-4/+2
|
* Refactor how ABConfigs are fetched.Harald Eilertsen2020-02-134-20/+25
| | | | | | | Introduce a `z()` menber function that creates the request object that we use for further configuring the requset. This eliminates the need to two fetch functions, and is meant to provide a consistent way of doing these requests.
* Let api access client request object directly.Harald Eilertsen2020-02-132-5/+13
| | | | | This simplifies things a bit, as we don't need to buffer query params and such outside of the request itself.
* Add fetching ABConfig for only a given contact.Harald Eilertsen2020-02-132-0/+48
|
* abconfig: reorg + parse result into struct.Harald Eilertsen2020-01-046-15/+65
|
* Cargo fmtHarald Eilertsen2020-01-039-35/+10
|
* Move client constructor fn to submodule.Harald Eilertsen2020-01-033-14/+10
|
* Make channel and network stream behave like the rest.Harald Eilertsen2020-01-037-13/+75
|
* Move Client out of the api objects.Harald Eilertsen2020-01-0313-137/+105
| | | | Also make constructor functions in the zotapi namespace.
* Use Url crate and move paths to submodules.Harald Eilertsen2020-01-037-33/+26
|
* Cargo fmtHarald Eilertsen2020-01-0216-190/+201
|
* No need for extern crate in Rust 2018.Harald Eilertsen2020-01-023-9/+0
|
* zotcli: Limit post to one or more groups.Harald Eilertsen2020-01-012-0/+7
|
* Allow limiting a new item to one or more privacy groups.Harald Eilertsen2020-01-012-12/+80
|
* Replace serde_urlencoded with serde_qs.Harald Eilertsen2020-01-016-36/+24
| | | | Simplifies serialization of various types quite a bit.
* Update deps.Harald Eilertsen2020-01-012-3/+3
|
* tests: Verify authorization properly.Harald Eilertsen2020-01-012-15/+15
|
* Update to Mockito 0.19 for smoother tests.Harald Eilertsen2019-07-292-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 Eilertsen2019-07-292-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 Eilertsen2019-06-121-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 Eilertsen2019-06-121-0/+17
|
* Make Error type public.Harald Eilertsen2019-06-121-0/+1
|
* zotcli: Handle attaching media to posts.Harald Eilertsen2019-06-122-1/+7
|
* Fix uploading of attachments to posts.Harald Eilertsen2019-06-122-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 Eilertsen2019-06-102-4/+57
|
* Implement fetching privacy group members.Harald Eilertsen2019-06-103-2/+83
|
* zotcli: Make group formatting work and print flags.Harald Eilertsen2019-06-101-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 Eilertsen2019-06-097-0/+106
|
* zotcli can now post messages with titles.Harald Eilertsen2019-06-092-4/+11
|
* Use clap_app macro to define args at compile time.Harald Eilertsen2019-06-092-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 Eilertsen2019-06-096-13/+24
|
* Add test for uploading two files.Harald Eilertsen2018-12-161-0/+37
|
* Upload one file should now work.Harald Eilertsen2018-12-163-7/+27
|
* Begin multipart/form-data upload support.Harald Eilertsen2018-11-193-1/+51
|
* Update to mockito 0.14.Harald Eilertsen2018-11-191-1/+1
|
* Merge branch 'rewrite-examples'Harald Eilertsen2018-11-0616-299/+508
|\
| * Clear out old example code.rewrite-examplesHarald Eilertsen2018-11-066-298/+0
| |
| * Move abconfig example to new example app.Harald Eilertsen2018-11-063-0/+36
| |
| * Move the post new item example code to new example app.Harald Eilertsen2018-11-063-0/+40
| |
| * Import macros explicitly in zot cli example.Harald Eilertsen2018-10-281-2/+9
| | | | | | | | This requires rust 1.30.0 or later.
| * Move zot cli example modules into submodule.Harald Eilertsen2018-10-286-11/+12
| | | | | | | | Also rename example from zot to zotcli to avoid name clash.
| * Add fetching xchans to main sample.Harald Eilertsen2018-10-092-0/+74
| |
| * Add abook api to main example.Harald Eilertsen2018-10-082-0/+63
| |
| * Add fetching network_stream to main example.Harald Eilertsen2018-10-082-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 Eilertsen2018-10-081-3/+11
| |
| * Expand channel_stream to output items as on the web.Harald Eilertsen2018-10-071-3/+52
| |
| * Add new "master" example, to contain all examples as subcommands.Harald Eilertsen2018-09-243-0/+107
| | | | | | | | Only implements fetching the channel-stream for now.
| * Export zotapi::ClientHarald Eilertsen2018-09-241-1/+1
|/
* Drop unused variables from examples.Harald Eilertsen2018-09-232-4/+0
|