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
! 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 © 2024 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
- Variables
- func CreateLogfile(dsc ...string) (logfile *os.File, err error)
- func CreateNewClient(cookiename string) (client *http.Client, jar *cookiejar.Jar, err error)
- func FuncNameOfThisFunction(level int) (funcname string)
- func GetEventidOfEventBox(eventid string) (namelist []string, err error)
- func GetEventinf(eventid string, eventinfo *Event_Inf) (err error)
- func GetEventinfAndRoomList(eventid string, breg int, ereg int, eventinfo *Event_Inf, ...) (status int)
- func GetEventinfAndRoomListBR(client *http.Client, eventid string, breg int, ereg int, eventinfo *Event_Inf, ...) (status int)
- func GetRoominfFromEventOfBR(client *http.Client, eventid string, breg int, ereg int) (roomlistinf *srapi.RoomListInf, err error)
- func LoadConfig(filePath string, config interface{}) (err error)
- func LoginShowroom(client *http.Client, acct string, pswd string) (userid string, err error)
- func MakePeriod(started_at int64, ended_at int64) (period string, err error)
- func MakeSampleTime(cval int, cvar int) (stm, sts int)
- func MkRoomsForStarCollec(client *http.Client, category string, aplmin int, maxnoroom int, ...) (lives *[]srapi.Live, err error)
- func PrintExf(comment ...string) func()
- func PrtHdr() (fncname string)
- func SetThdata(eventinf *Event_Inf, thdata *Thdata) (err error)
- func TestOfApiActivefanNextlevel(filename string) (err error)
- type Block
- type BlockInf
- type BlockInfList
- type Event_Inf
- type ExclList
- type Ptdata
- type RoomAfnl
- type RoomInfo
- type RoomInfoList
- type RoomVisit
- type Thdata
Constants ¶
const Version = "00AB01"
Variables ¶
var Hdrspc = ""
var SortByFollowers bool
Functions ¶
func CreateNewClient ¶
HTTPクライアントを作り、cookiejarをセットする。
func FuncNameOfThisFunction ¶ added in v1.4.0
func GetEventidOfEventBox ¶ added in v1.4.0
func GetEventinf ¶ added in v1.4.0
func GetEventinfAndRoomList ¶ added in v1.4.0
func GetEventinfAndRoomListBR ¶ added in v1.4.0
func GetRoominfFromEventOfBR ¶ added in v1.5.0
func LoadConfig ¶
設定ファイルを読み込む
以下の記事を参考にさせていただきました。 【Go初学】設定ファイル、環境変数から設定情報を取得する https://note.com/artefactnote/n/n8c22d1ac4b86
func LoginShowroom ¶
Showroomのサービスにログインし、ユーザIDを取得する。
func MakePeriod ¶ added in v1.5.0
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 ¶
ファンレベルの達成状況を取得する
使用しているSHOWROOMのAPI srapi.ApiLiveCurrentUser() srapi.CsrfToken() srapi.UserLogin() srapi.ApiActivefanNextlevel()
Types ¶
type BlockInfList ¶ added in v1.5.0
type BlockInfList struct {
Blockinf []BlockInf
}
func GetEventidOfBlockEvent ¶ added in v1.4.0
func GetEventidOfBlockEvent( eventid string, ) ( blockinflist BlockInfList, err error, )
ブロックイベントの子のイベントのeventidを取得する。
type Event_Inf ¶ added in v1.4.0
type Event_Inf struct { Event_ID string I_Event_ID int Event_name string Period string Dperiod float64 Start_time time.Time Sstart_time string Start_date float64 End_time time.Time Send_time string NoEntry int NoRoom int // ルーム数 Intervalmin int Modmin int Modsec int Fromorder int Toorder int Resethh int Resetmm int Nobasis int Maxdsp int Cmap int Target int Rstatus string Maxpoint int // グラフのy軸のスケールを固定する Thinit int Thdelta int MaxPoint int // DBには該当するものはない(データ中最大のポイント値を意味し、内部的に使用する) Gscale int // DBのMaxpoint = 構造体の Maxpoint + Gscale Achk int // 1: ブロック、2:ボックス、子ルーム未処理のあいだはそれぞれ +4 Aclr int // gtplの制御のために一時的に使用する EventStatus string // "Over", "BeingHeld", "NotHeldYet" Pntbasis int Ordbasis int League_ids string Valid bool // データとして有効か?(内部処理で処理の分岐に使う) }
func ConvertEventToEventinf ¶ added in v1.4.0
ApiEventSearch()で得られるイベント情報構造体 srapi.Eventを データベースのeventテーブルに対応したexsrapi.Event_Infに変換する
type Ptdata ¶
type Ptdata struct { Elm [2]string // Elm[0] 対象となるイベントID(の一部)、#lm[1] 対象となるイベント名(の一部) Thinit int // 基準ポイントの初期値 Thdelta int // Thinit * Thdelta * イベント開始後の経過時間(hour) を基準ポイントとする }
データ取得対象とするルームの基準ポイント
type RoomAfnl ¶
type RoomAfnl struct { Room_id string // 配信者のID Main_name string // 配信者の名前 Afnl srapi.ActiveFanNextLevel }
配信者のリストから、ファンレベルの達成状況を調べる。
func GetActiveFanNextLevel ¶
type RoomInfo ¶ added in v1.4.0
type RoomInfo struct { Name string // ルーム名のリスト Longname string Shortname string Account string // アカウントのリスト、アカウントは配信のURLの最後の部分の英数字です。 ID string // IDのリスト、IDはプロフィールのURLの最後の部分で5~6桁の数字です。 Userno int // APIで取得できるデータ(1) Genre string Rank string Irank int Nrank string Prank string Followers int Sfollowers string Fans int Fans_lst int Level int Slevel string // APIで取得できるデータ(2) Order int Point int // イベント終了後12時間〜36時間はイベントページから取得できることもある Spoint string Istarget string Graph string Iscntrbpoint string Color string Colorvalue string // Colorinflist ColorInfList Formid string Eventid string Status string Statuscolor string }
type RoomInfoList ¶ added in v1.4.0
type RoomInfoList []RoomInfo
func (RoomInfoList) Choose ¶ added in v1.4.0
func (r RoomInfoList) Choose(from, to int) (s RoomInfoList)
func (RoomInfoList) Swap ¶ added in v1.4.0
func (r RoomInfoList) Swap(i, j int)
type Thdata ¶
func ReadThdata ¶
実行パラメータとデータ取得対象となるルームのポイント基準値を読み込む Thdata Hh int, 開催中のイベントとhh時間以内に始まるイベントをデータ取得対象とする。 From int, 順位がfromからtoまでの範囲をデータ取得の対象とする To int, Ptdlist *[]Ptdata, データ取得対象とするポイント基準
Source Files
¶
- ConvertEventToEventinf.go
- CreateLogfile.go
- CreateNewClient.go
- FuncNameOfThisFunction.go
- GetActiveFanNextLevel.go
- GetEventidOfBlockEvent.go
- GetEventidOfEventBox.go
- GetEventiinfAndRoomListBR.go
- GetEventinf.go
- GetEventinfAndRoomList.go
- GetRoominfFromEventOfBR.go
- LoadConfig.go
- LoginShowroom.go
- MakePeriod.go
- MakeSampleTime.go
- MkRoomsForStarCol.go
- PrintExf.go
- PrtHdr.go
- SetThdata.go
- TestOfApiActivefanNextlevel.go
- exsrapi.go