types

package
v0.0.0-...-ff458ad Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MarkStrong = "strong"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Draft

type Draft struct {
	Type                        string         `json:"type,omitempty"`
	DraftTitle                  string         `json:"draft_title,omitempty"`
	DraftSubtitle               string         `json:"draft_subtitle,omitempty"`
	DraftPodcastURL             string         `json:"draft_podcast_url,omitempty"`
	Audience                    string         `json:"audience,omitempty"`
	SectionChosen               bool           `json:"section_chosen,omitempty"`
	DraftPodcastDuration        int64          `json:"draft_podcast_duration,omitempty"`
	DraftVideoUploadID          string         `json:"draft_video_upload_id,omitempty"`
	DraftPodcastUploadID        string         `json:"draft_podcast_upload_id,omitempty"`
	DraftPodcastPreviewUploadID string         `json:"draft_podcast_preview_upload_id,omitempty"`
	DraftVoiceoverUploadID      string         `json:"draft_voiceover_upload_id,omitempty"`
	PublicationID               int            `json:"publication_id,omitempty"`
	WordCount                   int            `json:"word_count,omitempty"`
	WriteCommentPermissions     string         `json:"write_comment_permissions,omitempty"`
	ShouldSendEmail             bool           `json:"should_send_email,omitempty"`
	ShowGuestBios               bool           `json:"show_guest_bios,omitempty"`
	CoverImage                  string         `json:"cover_image,omitempty"`
	Description                 string         `json:"description,omitempty"`
	SearchEngineDescription     string         `json:"search_engine_description,omitempty"`
	SearchEngineTitle           string         `json:"search_engine_title,omitempty"`
	Slug                        string         `json:"slug,omitempty"`
	SocialTitle                 string         `json:"social_title,omitempty"`
	PodcastDescription          string         `json:"podcast_description,omitempty"`
	FreeUnlockRequired          bool           `json:"free_unlock_required,omitempty"`
	SyndicateVoiceoverToRss     bool           `json:"syndicate_voiceover_to_rss,omitempty"`
	AudienceBeforeArchived      string         `json:"audience_before_archived,omitempty"`
	ExemptFromArchivePaywall    bool           `json:"exempt_from_archive_paywall,omitempty"`
	Explicit                    string         `json:"explicit,omitempty"`
	DefaultCommentSort          string         `json:"default_comment_sort,omitempty"`
	DraftBody                   DraftBody      `json:"draft_body,omitempty"`
	DraftSectionID              string         `json:"draft_section_id,omitempty"`
	ShouldSendFreePreview       bool           `json:"should_send_free_preview,omitempty"`
	Body                        string         `json:"body,omitempty"`
	DraftCreatedAt              *time.Time     `json:"draft_created_at,omitempty"`
	DraftUpdatedAt              *time.Time     `json:"draft_updated_at,omitempty"`
	EmailSentAt                 string         `json:"email_sent_at,omitempty"`
	ID                          int            `json:"id,omitempty"`
	IsPublished                 bool           `json:"is_published,omitempty"`
	PodcastDuration             string         `json:"podcast_duration,omitempty"`
	PodcastURL                  string         `json:"podcast_url,omitempty"`
	VideoUploadID               string         `json:"video_upload_id,omitempty"`
	PodcastUploadID             string         `json:"podcast_upload_id,omitempty"`
	PodcastPreviewUploadID      string         `json:"podcast_preview_upload_id,omitempty"`
	VoiceoverUploadID           string         `json:"voiceover_upload_id,omitempty"`
	PostDate                    string         `json:"post_date,omitempty"`
	ReplyToPostID               string         `json:"reply_to_post_id,omitempty"`
	SectionID                   string         `json:"section_id,omitempty"`
	SubscriberSetID             string         `json:"subscriber_set_id,omitempty"`
	Subtitle                    string         `json:"subtitle,omitempty"`
	Title                       string         `json:"title,omitempty"`
	UUID                        string         `json:"uuid,omitempty"`
	EditorV2                    bool           `json:"editor_v2,omitempty"`
	DraftVideoUpload            string         `json:"draftVideoUpload,omitempty"`
	DraftPodcastUpload          string         `json:"draftPodcastUpload,omitempty"`
	PodcastEpisodeNumber        string         `json:"podcast_episode_number,omitempty"`
	PodcastSeasonNumber         string         `json:"podcast_season_number,omitempty"`
	PodcastEpisodeType          string         `json:"podcast_episode_type,omitempty"`
	ShouldSyndicateToOtherFeed  string         `json:"should_syndicate_to_other_feed,omitempty"`
	SyndicateToSectionID        string         `json:"syndicate_to_section_id,omitempty"`
	HideFromFeed                bool           `json:"hide_from_feed,omitempty"`
	DraftBylines                []DraftBylines `json:"draft_bylines,omitempty"`
}

type DraftBody

type DraftBody Node

func (DraftBody) MarshalJSON

func (db DraftBody) MarshalJSON() ([]byte, error)

func (*DraftBody) UnmarshalJSON

func (db *DraftBody) UnmarshalJSON(b []byte) error

type DraftBylines

type DraftBylines struct {
	ID      int  `json:"id"`
	IsGuest bool `json:"is_guest"`
}

type DraftRequest

type DraftRequest struct {
	Draft
}

type DraftResponse

type DraftResponse struct {
	Draft
}

type ImageRequest

type ImageRequest struct {
	Image string `json:"image,omitempty"`
}

type ImageResponse

type ImageResponse struct {
	ID          string `json:"id,omitempty"`
	URL         string `json:"url,omitempty"`
	ContentType string `json:"contentType,omitempty"`
	Bytes       int64  `json:"bytes,omitempty"`
}

type Mark

type Mark struct {
	Type MarkType `json:"type"`
}

type MarkType

type MarkType string

type Node

type Node struct {
	Type NodeType `json:"type"`

	// for container nodes
	Content []*Node `json:"content,omitempty"`

	// some types have args
	Args map[string]string `json:"args,omitempty"`

	// for inline nodes
	Text  string  `json:"text,omitempty"`
	Marks []*Mark `json:"marks,omitempty"`
}

func NewNode

func NewNode(t NodeType, content ...*Node) *Node

type NodeType

type NodeType string
const (
	NTDoc            NodeType = "doc"
	NTParagraph      NodeType = "paragraph"
	NTHeading        NodeType = "heading"
	NTCaptionedImage NodeType = "captionedImage"
	NTImage2         NodeType = "image2"
	NTCaption        NodeType = "caption"
	NTFootnote       NodeType = "footnote"
	NTText           NodeType = "text"
	NTFootnoteAnchor NodeType = "footnoteAnchor"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL