2018-09-19 16:49:34 +02:00
|
|
|
extern crate canapi;
|
|
|
|
extern crate serde;
|
|
|
|
#[macro_use]
|
|
|
|
extern crate serde_derive;
|
|
|
|
|
|
|
|
macro_rules! api {
|
|
|
|
($url:expr => $ep:ty) => {
|
|
|
|
impl Endpoint for $ep {
|
|
|
|
type Id = i32;
|
|
|
|
|
|
|
|
fn endpoint() -> &'static str {
|
|
|
|
$url
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2018-10-21 18:22:27 +02:00
|
|
|
pub mod apps;
|
2018-09-19 16:49:34 +02:00
|
|
|
pub mod posts;
|
2018-12-24 16:42:40 +01:00
|
|
|
|
|
|
|
#[derive(Default)]
|
|
|
|
pub struct Api {
|
|
|
|
pub posts: posts::PostEndpoint,
|
2019-03-20 17:56:17 +01:00
|
|
|
}
|