docs(backend): Document some functions and structures
Signed-off-by: Lucien Cartier-Tilet <lucien@phundrak.com>
This commit is contained in:
10
src/data.rs
10
src/data.rs
@@ -6,6 +6,9 @@ pub struct Data {
|
||||
pub user: User,
|
||||
}
|
||||
|
||||
/// GitHub user
|
||||
///
|
||||
/// Contains their newest, most starred, and pinned repositories,
|
||||
#[derive(Default, Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct User {
|
||||
@@ -14,24 +17,31 @@ pub struct User {
|
||||
pub pinned: Pinned,
|
||||
}
|
||||
|
||||
/// Newest repositories
|
||||
#[derive(Default, Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct Newest {
|
||||
pub nodes: Vec<Repository>,
|
||||
}
|
||||
|
||||
/// Most starred repositories
|
||||
#[derive(Default, Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct MostStarred {
|
||||
pub nodes: Vec<Repository>,
|
||||
}
|
||||
|
||||
/// Pinned repositories
|
||||
#[derive(Default, Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct Pinned {
|
||||
pub nodes: Vec<Repository>,
|
||||
}
|
||||
|
||||
/// Repository
|
||||
///
|
||||
/// Contains the name of the repository, the amount of stars, and the
|
||||
/// amount of forks of the repository
|
||||
#[derive(Default, Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase", rename = "node")]
|
||||
pub struct Repository {
|
||||
|
||||
Reference in New Issue
Block a user