forked from MightyPork/elefren-fork
0.3.0 Redone registration api, added debug/clone
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use chrono::prelude::*;
|
||||
#[derive(Deserialize)]
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
pub struct Account {
|
||||
pub id: u64,
|
||||
pub username: String,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#[derive(Deserialize)]
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
pub struct Card {
|
||||
pub url: String,
|
||||
pub title: String,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use super::status::Status;
|
||||
|
||||
#[derive(Deserialize)]
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
pub struct Context {
|
||||
pub ancestors: Vec<Status>,
|
||||
pub descendants: Vec<Status>,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#[derive(Deserialize)]
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
pub struct Instance {
|
||||
pub uri: String,
|
||||
pub title: String,
|
||||
|
||||
@@ -2,7 +2,7 @@ use chrono::prelude::*;
|
||||
use super::account::Account;
|
||||
use super::status::Status;
|
||||
|
||||
#[derive(Deserialize)]
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
pub struct Notification {
|
||||
pub id: u64,
|
||||
pub notification_type: NotificationType,
|
||||
@@ -11,7 +11,7 @@ pub struct Notification {
|
||||
pub status: Option<Status>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
pub enum NotificationType {
|
||||
Mention,
|
||||
Reblog,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#[derive(Deserialize)]
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
pub struct Relationship {
|
||||
pub following: bool,
|
||||
pub followed_by: bool,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#[derive(Deserialize)]
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
pub struct Report {
|
||||
pub id: u64,
|
||||
pub action_taken: String,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use super::prelude::{Account, Status};
|
||||
|
||||
#[derive(Deserialize)]
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
pub struct SearchResult {
|
||||
pub accounts: Vec<Account>,
|
||||
pub statuses: Vec<Status>,
|
||||
|
||||
@@ -2,7 +2,7 @@ use chrono::prelude::*;
|
||||
use super::prelude::*;
|
||||
use status_builder::Visibility;
|
||||
|
||||
#[derive(Deserialize)]
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
pub struct Status {
|
||||
pub id: i64,
|
||||
pub uri: String,
|
||||
@@ -26,7 +26,7 @@ pub struct Status {
|
||||
pub application: Application,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
pub struct Mention {
|
||||
pub url: String,
|
||||
pub username: String,
|
||||
@@ -34,16 +34,14 @@ pub struct Mention {
|
||||
pub id: u64,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
pub struct Tag {
|
||||
pub name: String,
|
||||
pub url: String,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
pub struct Application {
|
||||
pub name: String,
|
||||
pub website: String,
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user