models

package
v0.0.0-...-2719905 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package models contains representations of the various objects in the Ghost API

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Author

type Author struct {
	ID              string `json:"id"`
	Name            string `json:"name"`
	Slug            string `json:"slug"`
	ProfileImage    string `json:"profile_image"`
	CoverImage      string `json:"cover_image"`
	Bio             string `json:"bio"`
	Website         string `json:"website"`
	Location        string `json:"location"`
	Facebook        string `json:"facebook"`
	Twitter         string `json:"twitter"`
	MetaTitle       string `json:"meta_title"`
	MetaDescription string `json:"meta_description"`
	URL             string `json:"url"`
}

Author represents the Author model in Ghost's API

type Post

type Post struct {
	ID                 string    `json:"id"`
	UUID               string    `json:"uuid"`
	Title              string    `json:"title"`
	Slug               string    `json:"slug"`
	HTML               string    `json:"html"`
	Plaintext          string    `json:"plaintext"`
	Mobiledoc          string    `json:"mobiledoc"`
	CommentID          string    `json:"comment_id"`
	FeatureImage       string    `json:"feature_image"`
	Featured           bool      `json:"featured"`
	Page               bool      `json:"page"`
	MetaTitle          string    `json:"meta_title"`
	MetaDescription    string    `json:"meta_description"`
	CreatedAt          time.Time `json:"created_at"`
	UpdatedAt          time.Time `json:"updated_at"`
	PublishedAt        time.Time `json:"published_at"`
	CustomExcerpt      string    `json:"custom_excerpt"`
	Excerpt            string    `json:"excerpt"`
	CodeInjectionHead  string    `json:"codeinjection_head"`
	CodeInjectionFoot  string    `json:"codeinjection_foot"`
	OgImage            string    `json:"og_image"`
	OgTitle            string    `json:"og_title"`
	OgDescription      string    `json:"og_description"`
	TwitterImage       string    `json:"twitter_image"`
	TwitterTitle       string    `json:"twitter_title"`
	TwitterDescription string    `json:"twitter_description"`
	CustomTemplate     string    `json:"custom_template"`
	URL                string    `json:"url"`

	PrimaryAuthor *Author   `json:"primary_author"`
	PrimaryTag    *Tag      `json:"primary_tag"`
	Authors       []*Author `json:"authors"`
	Tags          []*Tag    `json:"tags"`
}

Post represents the Post model in Ghost's API

type Tag

type Tag struct {
	ID              string `json:"id"`
	Name            string `json:"name"`
	Slug            string `json:"slug"`
	Description     string `json:"description"`
	FeatureImage    string `json:"feature_image"`
	Visibility      string `json:"visibility"`
	MetaTitle       string `json:"meta_title"`
	MetaDescription string `json:"meta_description"`
	URL             string `json:"url"`
}

Tag represents the Tag model in Ghost's API

Jump to

Keyboard shortcuts

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