segmentfault

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ArticleTypeOriginal  int = 1 // 原创
	ArticleTypeRepost    int = 2 // 转载
	ArticleTypeTranslate int = 3 // 翻译
)
View Source
const DefaultBaseAPI = "https://segmentfault.com/gateway"

Variables

This section is empty.

Functions

This section is empty.

Types

type ArticleData

type ArticleData struct {
	ID int64 `json:"id"`
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func (*Client) Auth

func (c *Client) Auth(token string) (string, error)

func (*Client) Name

func (c *Client) Name() string

func (*Client) NewArticle added in v1.0.2

func (c *Client) NewArticle(r io.Reader) error

func (*Client) Publish

func (c *Client) Publish() (string, error)

type CreateArticleResponse

type CreateArticleResponse struct {
	Data    *ArticleData `json:"data"`
	Message string       `json:"msg"`
}

type GetUserResponse

type GetUserResponse struct {
	User *User `json:"user"`
}

type SearchTagRow

type SearchTagRow struct {
	ID   int64  `json:"id"`
	Name string `json:"name"`
}

type SearchTagsResponse

type SearchTagsResponse struct {
	Rows []*SearchTagRow `json:"rows"`
	Size int             `json:"size"`
}

type UploadResponse

type UploadResponse struct {
	URL string `json:"url"`
}

type User

type User struct {
	ID   int64  `json:"id"`
	Name string `json:"name"`
}

Jump to

Keyboard shortcuts

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