rest

package
v0.15.5 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ParamPostID = "post_id"

	ParamSortBy       = "sort_by"
	ParamSortOrder    = "sort_order"
	ParamParentID     = "parent_id"
	ParamCreationTime = "creation_time"
	ParamSubspace     = "subspace"
	ParamCreator      = "creator"
	ParamHashtags     = "hashtags"
)

Variables

This section is empty.

Functions

func RegisterRoutes

func RegisterRoutes(cliCtx client.Context, 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   types.OptionalData `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