Add client endpoint to get all pages
Signed-off-by: trivernis <trivernis@protonmail.com>pull/2/head
parent
df5f36204c
commit
6cfa8be646
@ -0,0 +1,19 @@
|
||||
use crate::api_core::common::PageInformation;
|
||||
use crate::api_core::Endpoint;
|
||||
|
||||
#[derive(Clone, Debug, Deserialize)]
|
||||
pub struct GetPagesResponse {
|
||||
/// The top level notebook page
|
||||
pub pages: PageInformation,
|
||||
}
|
||||
|
||||
pub struct GetPage;
|
||||
|
||||
impl Endpoint for GetPage {
|
||||
type Request = ();
|
||||
type Response = GetPagesResponse;
|
||||
|
||||
fn path() -> String {
|
||||
String::from("manage_pages/get_pages")
|
||||
}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
use super::super::common;
|
||||
|
||||
#[tokio::test]
|
||||
async fn it_returns_all_pages() {
|
||||
let client = common::get_client();
|
||||
client.get_pages().await.unwrap();
|
||||
}
|
Loading…
Reference in New Issue