client

package
v0.0.0-...-6235a88 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2022 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const CookieName = "user_session"
View Source
const LoginURL = "https://secure.nicovideo.jp/secure/login?show_button_twitter=1&site=niconico&show_button_facebook=1&next_url="

Variables

View Source
var LoginFail = errors.New("Login Failed")

Functions

This section is empty.

Types

type Chat

type Chat struct {
	Thread    int64  `json:"thread"`
	No        int64  `json:"no"`
	Vpos      int64  `json:"vpos"`
	Date      int64  `json:"date"`
	Mail      string `json:"mail"`
	UserID    string `json:"user_id"`
	Anonymity int64  `json:"anonymity"`
	Leaf      int64  `json:"leaf"`
	Content   string `json:"content"`
}

type ChatList

type ChatList []Chat

func (ChatList) Len

func (p ChatList) Len() int

func (ChatList) Less

func (p ChatList) Less(i, j int) bool

func (ChatList) Swap

func (p ChatList) Swap(i, j int)

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is NicoClient

func LoginWithPassword

func LoginWithPassword(user, pass string) (*Client, error)

func NewClient

func NewClient() *Client

NewClient creates new Client

func (*Client) GetComment

func (cl *Client) GetComment(info *ResInfo, tid string, when int64) ([]Chat, error)

func (*Client) GetCommentKey

func (cl *Client) GetCommentKey(info *ResInfo, tid string) (url.Values, error)

func (*Client) GetResInfo

func (cl *Client) GetResInfo(vid string) (*ResInfo, error)

func (*Client) GetWaybackKey

func (cl *Client) GetWaybackKey(info *ResInfo, tid string) (string, error)

type ResInfo

type ResInfo struct {
	UserID           string
	MessageURL       string
	ThreadID         string
	OptionalThreadID string
	NeedsKey         bool
}

Jump to

Keyboard shortcuts

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