diff --git a/src/lib.rs b/src/lib.rs index b79c47f..e2a1b85 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1 +1,2 @@ mod client; +mod post; diff --git a/src/post.rs b/src/post.rs new file mode 100644 index 0000000..a1b1c1e --- /dev/null +++ b/src/post.rs @@ -0,0 +1,40 @@ +pub type Id = u64; +pub type FileSize = u64; +pub type ImageDimension = u64; + +pub struct Post { + id: Id, + created_at: String, + updated_at: String, + tags: PostTags, + file: PostFile, + rating: String, + fav_count: u16, + sources: Vec, + approver_id: Id, + uploader_ud: Id, + description: String, + comment_count: u16, + has_notes: bool, + is_favorited: bool, + change_seq: u128 +} + +pub struct PostTags { + general: Vec, + artist: Vec, + copyright: Vec, + character: Vec, + invalid: Vec, + meta: Vec, + lore: Vec +} + +pub struct PostFile { + width: ImageDimension, + height: ImageDimension, + ext: String, + size: FileSize, + md5: String, + url: String +}