New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get Block Children #4
Conversation
src/models.rs
Outdated
#[derive(Serialize, Deserialize, Debug, Eq, PartialEq, Clone)] | ||
pub struct Block { | ||
id: BlockId, | ||
r#type: BlockType, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat, but instead what about
r#type: BlockType, | |
#[serde(rename = "type")] | |
block_type: BlockType, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should block actually be an enum
?
pub enum Block {
Paragraph {
#[serde(flatten)]
common: BlockCommon
}
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it needs to be. ill refactor it
aefe435
to
ddeced3
Compare
Closing in favor of #9 |
Description
Generic implementation of retrieving block information. I have yet to enumerate different fields for specific Block types.
Fixed some visibility issues for people using this client externally.
Fixed an casing issue when deserializing Url types