nicolive

package module
v0.0.0-...-19c6ca5 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2022 License: MIT Imports: 8 Imported by: 0

README

nicolive

build status

Nicolive comments fetcher.

Installation

$ go get github.com/dqn/nicolive

Usage

package main

import (
  "fmt"

  "github.com/dqn/nicolive"
)

func main() {
  n, err := nicolive.New("MAIL", "PASSWORD")
  if err != nil {
    // Handle error.
  }

  err = n.Listen("LIVE_ID", func(c *nicolive.Chat) error {
    fmt.Println(c.Text)
    return nil
  })

  if err != nil {
    // Handle error.
  }
}

CLI

$ go get github.com/dqn/nicolive/cmd/nicolive
$ nicolive <mail> <password> <live-id>

License

MIT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chat

type Chat struct {
	XMLName   xml.Name `xml:"chat"`
	Text      string   `xml:",chardata"`
	Thread    string   `xml:"thread,attr"`
	Vpos      string   `xml:"vpos,attr"`
	Date      string   `xml:"date,attr"`
	DateUsec  string   `xml:"date_usec,attr"`
	Mail      string   `xml:"mail,attr"`
	UserID    string   `xml:"user_id,attr"`
	Premium   string   `xml:"premium,attr"`
	Anonymity string   `xml:"anonymity,attr"`
	Locale    string   `xml:"locale,attr"`
	Score     string   `xml:"score,attr"`
}

type Nicolive

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

func New

func New(mail, password string) (*Nicolive, error)

func (*Nicolive) Listen

func (n *Nicolive) Listen(liveID string, handler func(c *Chat) error) error

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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