wetsuit

package module
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2020 License: MIT Imports: 11 Imported by: 1

README

Wetsuit

Wetsuit is simple go client library for rinsuki/sea.

Documentation

Index

Constants

View Source
const (
	Version = "v1.1.1"
)

Variables

This section is empty.

Functions

func GetAuthorizeURL

func GetAuthorizeURL(origin string, cid string, state string) (string, error)

func GetToken

func GetToken(origin string, cid string, cs string, state string, code string) (string, error)

Types

type Client

type Client struct {
	ClientID     string
	ClientSecret string
	AccessToken  string
	Origin       string
	HTTPClient   *http.Client
}

func NewClient

func NewClient(origin string, clientID string, clientSecret string, accessToken string) *Client

func (*Client) CreatePost

func (c *Client) CreatePost(text string) (int, error)

func (*Client) Get

func (c *Client) Get(path string) ([]byte, error)

func (*Client) GetTimeline

func (c *Client) GetTimeline(key string, options ...TimelineOption) (*[]entity.Post, error)

func (*Client) Patch

func (c *Client) Patch(path string, bodyToJSON interface{}) ([]byte, error)

func (*Client) Post

func (c *Client) Post(path string, bodyToJSON interface{}) ([]byte, error)

type TimelineOption

type TimelineOption func(c *url.Values)

func Limit

func Limit(l int) TimelineOption

func MaxID

func MaxID(mid int) TimelineOption
func Search(target string) TimelineOption

func SinceID

func SinceID(sid int) TimelineOption

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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