rest

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RestSortBy         = "sort_by"
	RestSortOrder      = "sort_order"
	RestParentID       = "parent_id"
	RestCreationTime   = "creation_time"
	RestAllowsComments = "allows_comments"
	RestSubspace       = "subspace"
	RestCreator        = "creator"
	RestHashtags       = "hashtags"
)

REST Variable names nolint

Variables

This section is empty.

Functions

func RegisterRoutes

func RegisterRoutes(cliCtx context.CLIContext, r *mux.Router)

RegisterRoutes - Central function to define routes that get registered by the main application

Types

type AddReactionReq added in v0.2.0

type AddReactionReq struct {
	BaseReq  rest.BaseReq `json:"base_req"`
	PostID   string       `json:"post_id"`
	Reaction string       `json:"reaction"`
}

AddReactionReq defines the properties of a reaction adding request's body.

type AnswerPollPostReq added in v0.3.0

type AnswerPollPostReq struct {
	BaseReq rest.BaseReq `json:"base_req"`
	Answers []string     `json:"answers"`
}

type CreatePostReq added in v0.2.0

type CreatePostReq struct {
	BaseReq        rest.BaseReq      `json:"base_req"`
	Message        string            `json:"message"`
	ParentID       string            `json:"parent_id"`
	AllowsComments bool              `json:"allows_comments"`
	Subspace       string            `json:"subspace"`
	OptionalData   map[string]string `json:"optional_data"`
	CreationTime   time.Time         `json:"creation_time"`
	Medias         types.Attachments `json:"attachments,omitempty"`
	PollData       *types.PollData   `json:"poll_data,omitempty"`
}

CreatePostReq defines the properties of a post creation request's body.

type RegisterReactionReq added in v0.4.0

type RegisterReactionReq struct {
	BaseReq   rest.BaseReq `json:"base_req"`
	Shortcode string       `json:"shortcode"`
	Value     string       `json:"value"`
	Subspace  string       `json:"subspace"`
}

type RemoveReactionReq added in v0.2.0

type RemoveReactionReq struct {
	BaseReq  rest.BaseReq `json:"base_req"`
	PostID   string       `json:"post_id"`
	Reaction string       `json:"reaction"`
}

RemoveReactionReq defines the properties of a reaction removal request's body.

Jump to

Keyboard shortcuts

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