toot

package module
v0.0.0-...-6e7fda6 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2017 License: MIT Imports: 5 Imported by: 0

README

Mastodon API client for Go

For instances of mastodon.social.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Id             string `json:"id"`
	Username       string `json:"username"`
	Acct           string `json:"acct"`
	DisplayName    string `json:"display_name"`
	Note           string `json:"note"`
	Url            string `json:"url"`
	Avatar         string `json:"avatar"`
	Header         string `json:"header"`
	Locked         bool   `json:"locked"`
	CreatedAt      string `json:"created_at"`
	FollowersCount int    `json:"followers_count"`
	FollowingCount int    `json:"following_count"`
	StatusesCount  int    `json:"statuses_count"`
}

type App

type App struct {
	ClientID     string `json:"client_id"`
	ClientSecret string `json:"client_secret"`
}

type Client

type Client struct {
	Url         string
	App         App
	AccessToken string
}

func (*Client) Login

func (c *Client) Login(username, password string, scope Scope) *Client

func (*Client) NewApp

func (c *Client) NewApp(name string, scope Scope) App

func (*Client) Toot

func (c *Client) Toot(status string)

type Scope

type Scope struct {
	Read   bool
	Write  bool
	Follow bool
}

func (Scope) String

func (s Scope) String() string

Jump to

Keyboard shortcuts

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