aboutsummaryrefslogtreecommitdiffstats
path: root/src/client.rs
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2020-01-03 23:32:44 +0100
committerHarald Eilertsen <haraldei@anduin.net>2020-01-03 23:32:44 +0100
commit0c76f0c9727a512475e29b5d099b5b7188f72052 (patch)
treed1c2b59458c62116447fa2d885113afe6a5378da /src/client.rs
parent5f96d9981a6d041f5c8a464cda10a0dc371060f8 (diff)
downloadrust-zotapi-0c76f0c9727a512475e29b5d099b5b7188f72052.tar.gz
rust-zotapi-0c76f0c9727a512475e29b5d099b5b7188f72052.tar.bz2
rust-zotapi-0c76f0c9727a512475e29b5d099b5b7188f72052.zip
Move Client out of the api objects.
Also make constructor functions in the zotapi namespace.
Diffstat (limited to 'src/client.rs')
-rw-r--r--src/client.rs33
1 files changed, 1 insertions, 32 deletions
diff --git a/src/client.rs b/src/client.rs
index 4c20854..dc6cf43 100644
--- a/src/client.rs
+++ b/src/client.rs
@@ -14,14 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
-use crate::{
- abconfig::ABConfigFetcher,
- abook::AbookFetcher,
- error::Error,
- group::{GroupFetcher, GroupMembersFetcher},
- item::ItemBuilder,
- xchan::XChanFetcher,
-};
+use crate::error::Error;
use reqwest::{
self,
header::{ACCEPT, CONTENT_TYPE},
@@ -50,14 +43,6 @@ impl Client {
}
}
- pub fn abconfig(&self) -> ABConfigFetcher {
- ABConfigFetcher::new(self)
- }
-
- pub fn abook(&self) -> AbookFetcher {
- AbookFetcher::new(self)
- }
-
pub fn channel_stream(&self) -> Result<String, Error> {
self.fetch_stream("channel/stream", &())
}
@@ -66,22 +51,6 @@ impl Client {
self.fetch_stream("network/stream", &())
}
- pub fn group(&self) -> GroupFetcher {
- GroupFetcher::new(self)
- }
-
- pub fn group_members(&self) -> GroupMembersFetcher {
- GroupMembersFetcher::new(self)
- }
-
- pub fn item(&self) -> ItemBuilder {
- ItemBuilder::new(self)
- }
-
- pub fn xchan(&self) -> XChanFetcher {
- XChanFetcher::new(self)
- }
-
fn url<T>(&self, path: &str, args: &T) -> String
where
T: Serialize + std::fmt::Debug,