exsrapi

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2022 License: MIT Imports: 11 Imported by: 21

README

Documentation

Overview

! Copyright © 2022 chouette.21.00@gmail.com Released under the MIT license https://opensource.org/licenses/mit-license.php

! Copyright © 2022 chouette.21.00@gmail.com Released under the MIT license https://opensource.org/licenses/mit-license.php

! Copyright © 2022 chouette.21.00@gmail.com Released under the MIT license https://opensource.org/licenses/mit-license.php

! Copyright © 2022 chouette.21.00@gmail.com Released under the MIT license https://opensource.org/licenses/mit-license.php

! Copyright © 2022 chouette.21.00@gmail.com Released under the MIT license https://opensource.org/licenses/mit-license.php

! Copyright © 2022 chouette.21.00@gmail.com Released under the MIT license https://opensource.org/licenses/mit-license.php

! Copyright © 2022 chouette.21.00@gmail.com Released under the MIT license https://opensource.org/licenses/mit-license.php

Ver.0.0.1 ConfigのFncを削除する。

Ver.0.1.0 ApiLiveCurrentUser()の引数roomidをstringとしたことへ対応する。ApiLiveCurrentUser()実行時のroomidにRoomid[0]を渡す。 Ver.1.0.0 下位の関数で戻り値をstatusかrerrに変更したことに対応する。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateLogfile

func CreateLogfile(dsc1, dsc2 string) (logfile *os.File)

ログファイルを作る。

func CreateNewClient

func CreateNewClient(
	cookiename string,
) (
	client *http.Client,
	jar *cookiejar.Jar,
	err error,
)

HTTPクライアントを作り、cookiejarをセットする。

func LoadConfig

func LoadConfig(filePath string, config interface{}) (err error)

設定ファイルを読み込む

以下の記事を参考にさせていただきました。
	【Go初学】設定ファイル、環境変数から設定情報を取得する
		https://note.com/artefactnote/n/n8c22d1ac4b86

func LoginShowroom

func LoginShowroom(
	client *http.Client,
	acct string,
	pswd string,
) (
	userid string,
	err error,
)

Showroomのサービスにログインし、ユーザIDを取得する。

func MkRoomsForStarCollec

func MkRoomsForStarCollec(
	client *http.Client,
	category string,
	aplmin int,
	maxnoroom int,
	excllist *ExclList,
	roomvisit *map[int]time.Time,
) (
	lives *[]srapi.Live,
	err error,
)

星集め、種集めの対象とするルームの一覧を作成する。

func TestOfApiActivefanNextlevel

func TestOfApiActivefanNextlevel(filename string) (err error)

ファンレベルの達成状況を取得する

使用しているSHOWROOMのAPI
	srapi.ApiLiveCurrentUser()
	srapi.CsrfToken()
	srapi.UserLogin()
	srapi.ApiActivefanNextlevel()

Types

type ExclList

type ExclList map[int]string //	除外ルームIDリスト

除外リスト

func (ExclList) Read

func (el ExclList) Read(
	category string,
	exclfilename string,
) (
	err error,
)

除外リストの読み込み

type RoomAfnl

type RoomAfnl struct {
	Room_id   string //	配信者のID
	Main_name string //	配信者の名前
	Afnl      srapi.ActiveFanNextLevel
}

配信者のリストから、ファンレベルの達成状況を調べる。

func GetActiveFanNextLevel

func GetActiveFanNextLevel(
	client *http.Client,
	userid string,
	rooms *[]srapi.RoomFollowing,
) (
	roomafnls []RoomAfnl,
	err error,
)

type RoomVisit

type RoomVisit struct {
	Rvlfn     string
	Category  string
	Roomvisit map[int]time.Time
}

訪問済みルーム情報

func (*RoomVisit) Restore

func (r *RoomVisit) Restore(
	category string,
	rvlfn string,
	aplmin int,
) (
	err error,
)

配信ルーム訪問情報の読み込み

func (*RoomVisit) Save

func (r *RoomVisit) Save() (
	err error,
)

配信ルーム訪問情報の書き出し

Jump to

Keyboard shortcuts

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