aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib.rs
Commit message (Collapse)AuthorAgeFilesLines
* Another reqrite...Harald Eilertsen2023-03-291-15/+16
| | | | | | | | | | | | | | | | | | Third time must be where it sits I hope. I felt the API was getting a bit too distracted by unnecessary constructs and abstractions, so I'm trying to simplify it by making it more straight forward. The idea now is to have one main API class (ZotApi), and all the various remote API's as public methods on this basic class. Iow, the ZotApi class is mainly based on the existing `Client` class, which is then being phased out. And instead of having each API tied to the data type they return, I'm just adding methods that will return the respective data types. This should reduce coupling between the returned data, and the API calls themselves.
* Add ZotAPI trait and derive macro.Harald Eilertsen2023-03-271-0/+2
| | | | | | | | | The idea is to try to generate more of the boilerplate code, but for now we only do the `z()` method definition. There are also some we're not quite able to replace yet (like XChanRequest) since it also has life times. It's a start anyways :)
* Implement "verify" API.HEADmasterHarald Eilertsen2023-03-261-0/+2
| | | | | | | The verify API call returns a full channel object, including the corresponding xchan. I've added the xchan as a field in the Channel object, instead of having all the fields in one object like it is returned from the API.
* xchan: update internal api and parse results into struct.Your Name2020-05-021-1/+1
|
* Update abook with struct and request object.Harald Eilertsen2020-02-141-1/+1
|
* Refactor how ABConfigs are fetched.Harald Eilertsen2020-02-131-1/+2
| | | | | | | 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.
* abconfig: reorg + parse result into struct.Harald Eilertsen2020-01-041-2/+1
|
* Move client constructor fn to submodule.Harald Eilertsen2020-01-031-5/+1
|
* Make channel and network stream behave like the rest.Harald Eilertsen2020-01-031-0/+4
|
* Move Client out of the api objects.Harald Eilertsen2020-01-031-0/+5
| | | | Also make constructor functions in the zotapi namespace.
* Cargo fmtHarald Eilertsen2020-01-021-2/+1
|
* No need for extern crate in Rust 2018.Harald Eilertsen2020-01-021-3/+0
|
* Replace serde_urlencoded with serde_qs.Harald Eilertsen2020-01-011-1/+0
| | | | Simplifies serialization of various types quite a bit.
* Make Error type public.Harald Eilertsen2019-06-121-0/+1
|
* Fetch privacy groups.Harald Eilertsen2019-06-091-0/+1
|
* Export zotapi::ClientHarald Eilertsen2018-09-241-1/+1
|
* Begin implement undocumented abconfig API.Harald Eilertsen2018-09-231-0/+1
|
* Begin implementaton of undocumented abook api to fetch connections.Harald Eilertsen2018-09-231-0/+1
|
* Add support for fetching xchan data by address.Harald Eilertsen2018-08-211-0/+2
| | | | | | | 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.
* Refactoring: Split into submodules.Harald Eilertsen2018-08-201-123/+5
|
* Refactoring: Make Client::post_data helper.Harald Eilertsen2018-08-201-17/+25
| | | | | 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 Eilertsen2018-08-201-20/+0
|
* Use builder pattern to construct items.Harald Eilertsen2018-08-201-0/+42
|
* First attempt at creating posts.Harald Eilertsen2018-08-191-1/+22
|
* Add licence blurb to sources.Harald Eilertsen2018-08-191-0/+16
|
* Add method for fetching network stream.Harald Eilertsen2018-08-191-0/+5
|
* Generalize channel_stream into internal helper function.Harald Eilertsen2018-08-191-5/+9
|
* Return error from channel stream API if unauthorized.Harald Eilertsen2018-08-191-6/+32
|
* Refactor generating target urlHarald Eilertsen2018-08-071-3/+4
|
* Pass authorization info to endpoint.Harald Eilertsen2018-08-071-5/+18
| | | | | | It seems like Hubzilla will accept basic authorization info in the first request. This does not follow the described signal flow for basic authorization, but for now we'll use whatever works.
* First iteration of getting channel stream from server.Harald Eilertsen2018-08-071-0/+32
|
* Zet ze ztage...Harald Eilertsen2018-08-021-0/+7