Skip to content
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

Closed

Conversation

bspradling
Copy link
Collaborator

@bspradling bspradling commented May 16, 2021

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

@bspradling bspradling marked this pull request as ready for review May 16, 2021 14:55
src/models.rs Outdated
#[derive(Serialize, Deserialize, Debug, Eq, PartialEq, Clone)]
pub struct Block {
id: BlockId,
r#type: BlockType,
Copy link
Owner

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

Suggested change
r#type: BlockType,
#[serde(rename = "type")]
block_type: BlockType,

Copy link
Owner

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
    }
    ...

Copy link
Collaborator Author

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

@bspradling
Copy link
Collaborator Author

Closing in favor of #9

@bspradling bspradling closed this May 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants