reorg
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
use async_trait::async_trait;
|
||||
pub use crate::model::Conversation;
|
||||
|
||||
#[async_trait]
|
||||
pub trait APIInterface {
|
||||
fn version(&self) -> String;
|
||||
type Error;
|
||||
|
||||
// (GET) /version
|
||||
async fn get_version(&self) -> Result<String, Self::Error>;
|
||||
|
||||
// (GET) /conversations
|
||||
async fn get_conversations(&self) -> Result<Vec<Conversation>, Self::Error>;
|
||||
}
|
||||
|
||||
pub struct TestClient {}
|
||||
|
||||
impl APIInterface for TestClient {
|
||||
fn version(&self) -> String {
|
||||
return "KordophoneTest-1.0".to_string()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user