summaryrefslogtreecommitdiffstats
path: root/src/mastodon_client.rs
diff options
context:
space:
mode:
authorPaul Woolcock <paul@woolcock.us>2019-03-16 11:03:33 -0400
committerPaul Woolcock <paul@woolcock.us>2019-03-16 11:04:47 -0400
commit45a95e5048f645caae8d175f5de31a937a5907aa (patch)
treea7d64bd7cb71814d57b6b7e50d47a543f6a2cf2a /src/mastodon_client.rs
parent9e3b7af44afc9d6ffa3f8589e581a21b801b8507 (diff)
add the beginning of an unauthenticated client
Diffstat (limited to 'src/mastodon_client.rs')
-rw-r--r--src/mastodon_client.rs26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/mastodon_client.rs b/src/mastodon_client.rs
index c5fee0e..23c6f8b 100644
--- a/src/mastodon_client.rs
+++ b/src/mastodon_client.rs
@@ -356,3 +356,29 @@ pub trait MastodonClient<H: HttpSend = HttpSender> {
unimplemented!("This method was not implemented");
}
}
+
+/// Trait that represents clients that can make unauthenticated calls to a
+/// mastodon instance
+#[allow(unused)]
+pub trait MastodonUnauthenticated<H: HttpSend> {
+ /// GET /api/v1/statuses/:id
+ fn get_status(&self, id: &str) -> Result<Status> {
+ unimplemented!("This method was not implemented");
+ }
+ /// GET /api/v1/statuses/:id/context
+ fn get_context(&self, id: &str) -> Result<Context> {
+ unimplemented!("This method was not implemented");
+ }
+ /// GET /api/v1/statuses/:id/card
+ fn get_card(&self, id: &str) -> Result<Card> {
+ unimplemented!("This method was not implemented");
+ }
+ /// GET /api/v1/statuses/:id/reblogged_by
+ fn reblogged_by(&self, id: &str) -> Result<Page<Account, H>> {
+ unimplemented!("This method was not implemented");
+ }
+ /// GET /api/v1/statuses/:id/favourited_by
+ fn favourited_by(&self, id: &str) -> Result<Page<Account, H>> {
+ unimplemented!("This method was not implemented");
+ }
+}