kordophone: add support for /messages
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
use async_trait::async_trait;
|
||||
pub use crate::model::Conversation;
|
||||
pub use crate::model::{
|
||||
Conversation, Message, ConversationID
|
||||
};
|
||||
use crate::model::JwtToken;
|
||||
|
||||
pub mod http_client;
|
||||
@@ -17,6 +19,9 @@ pub trait APIInterface {
|
||||
// (GET) /conversations
|
||||
async fn get_conversations(&mut self) -> Result<Vec<Conversation>, Self::Error>;
|
||||
|
||||
// (GET) /messages
|
||||
async fn get_messages(&mut self, conversation_id: &ConversationID) -> Result<Vec<Message>, Self::Error>;
|
||||
|
||||
// (POST) /authenticate
|
||||
async fn authenticate(&mut self, credentials: Credentials) -> Result<JwtToken, Self::Error>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user