misskey

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMiAuthUrl

func NewMiAuthUrl(host, sessionId string, config MiAuthConfig) url.URL

func NewSessionId

func NewSessionId() string

Types

type MiAuthCheckResponse

type MiAuthCheckResponse struct {
	Token string `json:"token"`
}

func MiAuthCheck

func MiAuthCheck(host, sessionId string) (MiAuthCheckResponse, error)

type MiAuthConfig

type MiAuthConfig struct {
	Name       string
	Icon       string
	Callback   string
	Permission []string
}

type Note

type Note struct {
	Id        string
	CreatedAt string
	Text      string
	Cw        string
	// User
	UserId     string
	Visibility string
}

type NotesCreateRequestBody

type NotesCreateRequestBody struct {
	I              string   `json:"i"`
	Text           string   `json:"text"`
	Visibility     string   `json:"visibility,omitempty"` // public, home, followers, specified
	VisibleUserIds []string `json:"visibleUserIds,omitempty"`
	Cw             string   `json:"cw,omitempty"`
	LocalOnly      bool     `json:"localOnly,omitempty"`
}

type NotesCreateResponse

type NotesCreateResponse struct {
	CreatedNote Note
}

func NotesCreate

func NotesCreate(host string, reqBody NotesCreateRequestBody) (data NotesCreateResponse, err error)

Jump to

Keyboard shortcuts

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