Private
Public Access
1
0

kordophone: add support for /messages

This commit is contained in:
2025-01-20 19:43:21 -08:00
parent 793faab721
commit a8104c379c
8 changed files with 206 additions and 6 deletions

View File

@@ -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>;
}