diff --git a/src/types/api/repo_meta.rs b/src/types/api/repo_meta.rs index 2495cbf..1c4b935 100644 --- a/src/types/api/repo_meta.rs +++ b/src/types/api/repo_meta.rs @@ -1,9 +1,22 @@ -// RepositoryMeta{ -// description: -// RepositoryMeta basic repository information -// -// full_name string -// id integer($int64) -// name string -// owner string -// } +use std::fmt::Display; + +use serde::{Deserialize, Serialize}; + +/// Represents basic repository information. +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +pub struct RepositoryMeta { + /// The full name of the repository. + pub full_name: String, + /// The unique identifier of the repository. + pub id: usize, + /// The name of the repository. + pub name: String, + /// The owner of the repository. + pub owner: String, +} + +impl Display for RepositoryMeta { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{}", self.full_name) + } +}