@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"response_data": {
|
||||||
|
"has_unread_announce": false,
|
||||||
|
"server_timestamp": 1679236714
|
||||||
|
},
|
||||||
|
"release_info": [],
|
||||||
|
"status_code": 200
|
||||||
|
}
|
||||||
+12474
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,96 @@
|
|||||||
|
{
|
||||||
|
"response_data": [
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"friend_action_cnt": 0,
|
||||||
|
"friend_greet_cnt": 0,
|
||||||
|
"friend_variety_cnt": 0,
|
||||||
|
"friend_new_cnt": 0,
|
||||||
|
"present_cnt": 0,
|
||||||
|
"secret_box_badge_flag": true,
|
||||||
|
"server_datetime": "2023-03-13 01:02:03",
|
||||||
|
"server_timestamp": 1678640523,
|
||||||
|
"notice_friend_datetime": "2013-04-15 11:47:00",
|
||||||
|
"notice_mail_datetime": "2000-01-01 12:00:00",
|
||||||
|
"friends_approval_wait_cnt": 0,
|
||||||
|
"friends_request_cnt": 0,
|
||||||
|
"is_today_birthday": false,
|
||||||
|
"license_info": {
|
||||||
|
"license_list": [],
|
||||||
|
"licensed_info": [],
|
||||||
|
"expired_info": [],
|
||||||
|
"badge_flag": false
|
||||||
|
},
|
||||||
|
"using_buff_info": [],
|
||||||
|
"is_klab_id_task_flag": false,
|
||||||
|
"klab_id_task_can_sync": false,
|
||||||
|
"has_unread_announce": true,
|
||||||
|
"exchange_badge_cnt": [
|
||||||
|
642,
|
||||||
|
41,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"ad_flag": false,
|
||||||
|
"has_ad_reward": false
|
||||||
|
},
|
||||||
|
"status": 200,
|
||||||
|
"commandNum": false,
|
||||||
|
"timeStamp": 1678640523
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"new_achievement_cnt": 61,
|
||||||
|
"unaccomplished_achievement_cnt": 80,
|
||||||
|
"live_daily_reward_exist": false,
|
||||||
|
"training_energy": 3,
|
||||||
|
"training_energy_max": 3,
|
||||||
|
"notification": {
|
||||||
|
"push": true,
|
||||||
|
"lp": false,
|
||||||
|
"update_info": false,
|
||||||
|
"campaign": false,
|
||||||
|
"live": false,
|
||||||
|
"lbonus": false,
|
||||||
|
"event": true,
|
||||||
|
"secretbox": true,
|
||||||
|
"birthday": true
|
||||||
|
},
|
||||||
|
"open_arena": true,
|
||||||
|
"costume_status": true,
|
||||||
|
"open_accessory": true,
|
||||||
|
"arena_si_skill_unique_check": true,
|
||||||
|
"open_v98": true
|
||||||
|
},
|
||||||
|
"status": 200,
|
||||||
|
"commandNum": false,
|
||||||
|
"timeStamp": 1678640523
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"accessory_list": [],
|
||||||
|
"wearing_info": [],
|
||||||
|
"especial_create_flag": false
|
||||||
|
},
|
||||||
|
"status": 200,
|
||||||
|
"commandNum": false,
|
||||||
|
"timeStamp": 1678640523
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"result": {
|
||||||
|
"museum_info": {
|
||||||
|
"parameter": {
|
||||||
|
"smile": 0,
|
||||||
|
"pure": 0,
|
||||||
|
"cool": 0
|
||||||
|
},
|
||||||
|
"contents_id_list": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"status": 200,
|
||||||
|
"commandNum": false,
|
||||||
|
"timeStamp": 1678640523
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"release_info": [],
|
||||||
|
"status_code": 200
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"response_data": [],
|
||||||
|
"release_info": [],
|
||||||
|
"status_code": 200
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"response_data": {
|
||||||
|
"enable_gdpr": true,
|
||||||
|
"is_eea": false,
|
||||||
|
"server_timestamp": 1679236700
|
||||||
|
},
|
||||||
|
"release_info": [],
|
||||||
|
"status_code": 200
|
||||||
|
}
|
||||||
+1778
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"response_data": [],
|
||||||
|
"release_info": [],
|
||||||
|
"status_code": 200
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"response_data": {
|
||||||
|
"has_notice": false,
|
||||||
|
"notice_id": 0,
|
||||||
|
"type": 0,
|
||||||
|
"title": "",
|
||||||
|
"contents": "",
|
||||||
|
"server_timestamp": 1679236701
|
||||||
|
},
|
||||||
|
"release_info": [],
|
||||||
|
"status_code": 200
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"response_data": {
|
||||||
|
"tos_id": 1,
|
||||||
|
"tos_type": 1,
|
||||||
|
"is_agreed": true,
|
||||||
|
"server_timestamp": 1679236701
|
||||||
|
},
|
||||||
|
"release_info": [],
|
||||||
|
"status_code": 200
|
||||||
|
}
|
||||||
@@ -0,0 +1,90 @@
|
|||||||
|
{
|
||||||
|
"response_data": {
|
||||||
|
"user": {
|
||||||
|
"user_id": 3241988,
|
||||||
|
"name": "\u68a6\u8def @\u65c5\u7acb\u3061\u306e\u65e5\u306b",
|
||||||
|
"level": 1028,
|
||||||
|
"exp": 28823566,
|
||||||
|
"previous_exp": 27734700,
|
||||||
|
"next_exp": 28941885,
|
||||||
|
"game_coin": 86618244,
|
||||||
|
"sns_coin": 49,
|
||||||
|
"free_sns_coin": 48,
|
||||||
|
"paid_sns_coin": 1,
|
||||||
|
"social_point": 1438165,
|
||||||
|
"unit_max": 900,
|
||||||
|
"waiting_unit_max": 700,
|
||||||
|
"energy_max": 417,
|
||||||
|
"energy_full_time": "2023-03-11 09:31:30",
|
||||||
|
"license_live_energy_recoverly_time": 60,
|
||||||
|
"energy_full_need_time": 0,
|
||||||
|
"over_max_energy": 0,
|
||||||
|
"training_energy": 10,
|
||||||
|
"training_energy_max": 10,
|
||||||
|
"friend_max": 99,
|
||||||
|
"invite_code": "377385143",
|
||||||
|
"insert_date": "2015-08-10 18:58:30",
|
||||||
|
"update_date": "2018-08-09 18:13:12",
|
||||||
|
"tutorial_state": -1,
|
||||||
|
"diamond_coin": 0,
|
||||||
|
"crystal_coin": 0,
|
||||||
|
"lp_recovery_item": [
|
||||||
|
{
|
||||||
|
"item_id": 1,
|
||||||
|
"amount": 17
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"item_id": 2,
|
||||||
|
"amount": 308
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"item_id": 3,
|
||||||
|
"amount": 622
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"item_id": 4,
|
||||||
|
"amount": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"item_id": 7,
|
||||||
|
"amount": 24
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"item_id": 10,
|
||||||
|
"amount": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"item_id": 13,
|
||||||
|
"amount": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"item_id": 14,
|
||||||
|
"amount": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"item_id": 801,
|
||||||
|
"amount": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"item_id": 802,
|
||||||
|
"amount": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"item_id": 803,
|
||||||
|
"amount": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"item_id": 805,
|
||||||
|
"amount": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"birth": {
|
||||||
|
"birth_month": 5,
|
||||||
|
"birth_day": 22
|
||||||
|
},
|
||||||
|
"server_timestamp": 1679236700
|
||||||
|
},
|
||||||
|
"release_info": [],
|
||||||
|
"status_code": 200
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package database
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"honoka-chan/config"
|
||||||
|
|
||||||
|
"github.com/redis/go-redis/v9"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
RedisCli *redis.Client
|
||||||
|
RedisCtx = context.Background()
|
||||||
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
RedisCli = redis.NewClient(&redis.Options{
|
||||||
|
Addr: config.Conf.Redis.Host + ":" + config.Conf.Redis.Port,
|
||||||
|
Password: config.Conf.Redis.Pass,
|
||||||
|
DB: config.Conf.Redis.Db,
|
||||||
|
})
|
||||||
|
|
||||||
|
_, err := RedisCli.Ping(RedisCtx).Result()
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
+138
-18
@@ -2,10 +2,10 @@ package handler
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"honoka-chan/database"
|
||||||
"honoka-chan/model"
|
"honoka-chan/model"
|
||||||
"honoka-chan/resp"
|
|
||||||
"honoka-chan/utils"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
@@ -19,25 +19,145 @@ func ApiHandler(ctx *gin.Context) {
|
|||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
v1 := false
|
var results []interface{}
|
||||||
for _, v := range formdata {
|
for _, v := range formdata {
|
||||||
|
var res string
|
||||||
|
var err error
|
||||||
// fmt.Println(v)
|
// fmt.Println(v)
|
||||||
if v.Module == "live" {
|
// fmt.Println(v.Module, v.Action)
|
||||||
v1 = true
|
|
||||||
break
|
switch v.Module {
|
||||||
|
case "login":
|
||||||
|
if v.Action == "topInfo" {
|
||||||
|
// fmt.Println("topInfo")
|
||||||
|
res, err = database.RedisCli.HGet(database.RedisCtx, "temp_dataset", "login_topinfo_result").Result()
|
||||||
|
} else if v.Action == "topInfoOnce" {
|
||||||
|
// fmt.Println("topInfoOnce")
|
||||||
|
res, err = database.RedisCli.HGet(database.RedisCtx, "temp_dataset", "login_topinfo_once_result").Result()
|
||||||
|
}
|
||||||
|
case "live":
|
||||||
|
if v.Action == "liveStatus" {
|
||||||
|
// fmt.Println("liveStatus")
|
||||||
|
res, err = database.RedisCli.HGet(database.RedisCtx, "temp_dataset", "live_status_result").Result()
|
||||||
|
} else if v.Action == "schedule" {
|
||||||
|
// fmt.Println("schedule")
|
||||||
|
res, err = database.RedisCli.HGet(database.RedisCtx, "temp_dataset", "live_list_result").Result()
|
||||||
|
}
|
||||||
|
case "unit":
|
||||||
|
switch v.Action {
|
||||||
|
case "unitAll":
|
||||||
|
// fmt.Println("unitAll")
|
||||||
|
res, err = database.RedisCli.HGet(database.RedisCtx, "temp_dataset", "unit_list_result").Result()
|
||||||
|
case "deckInfo":
|
||||||
|
// fmt.Println("deckInfo")
|
||||||
|
res, err = database.RedisCli.HGet(database.RedisCtx, "temp_dataset", "unit_deck_result").Result()
|
||||||
|
case "supporterAll":
|
||||||
|
// fmt.Println("supporterAll")
|
||||||
|
res, err = database.RedisCli.HGet(database.RedisCtx, "temp_dataset", "unit_support_result").Result()
|
||||||
|
case "removableSkillInfo":
|
||||||
|
// fmt.Println("removableSkillInfo")
|
||||||
|
res, err = database.RedisCli.HGet(database.RedisCtx, "temp_dataset", "owning_equip_result").Result()
|
||||||
|
case "accessoryAll":
|
||||||
|
// fmt.Println("accessoryAll")
|
||||||
|
res, err = database.RedisCli.HGet(database.RedisCtx, "temp_dataset", "unit_accessory_result").Result()
|
||||||
|
}
|
||||||
|
case "costume":
|
||||||
|
// fmt.Println("costumeList")
|
||||||
|
res, err = database.RedisCli.HGet(database.RedisCtx, "temp_dataset", "costume_list_result").Result()
|
||||||
|
case "album":
|
||||||
|
// fmt.Println("albumAll")
|
||||||
|
res, err = database.RedisCli.HGet(database.RedisCtx, "temp_dataset", "album_unit_result").Result()
|
||||||
|
case "scenario":
|
||||||
|
// fmt.Println("scenarioStatus")
|
||||||
|
res, err = database.RedisCli.HGet(database.RedisCtx, "temp_dataset", "scenario_status_result").Result()
|
||||||
|
case "subscenario":
|
||||||
|
// fmt.Println("subscenarioStatus")
|
||||||
|
res, err = database.RedisCli.HGet(database.RedisCtx, "temp_dataset", "subscenario_status_result").Result()
|
||||||
|
case "eventscenario":
|
||||||
|
// fmt.Println("status")
|
||||||
|
res, err = database.RedisCli.HGet(database.RedisCtx, "temp_dataset", "event_scenario_result").Result()
|
||||||
|
case "multiunit":
|
||||||
|
// fmt.Println("multiunitscenarioStatus")
|
||||||
|
res, err = database.RedisCli.HGet(database.RedisCtx, "temp_dataset", "multi_unit_scenario_result").Result()
|
||||||
|
case "payment":
|
||||||
|
// fmt.Println("productList")
|
||||||
|
res, err = database.RedisCli.HGet(database.RedisCtx, "temp_dataset", "product_result").Result()
|
||||||
|
case "banner":
|
||||||
|
// fmt.Println("bannerList")
|
||||||
|
res, err = database.RedisCli.HGet(database.RedisCtx, "temp_dataset", "banner_result").Result()
|
||||||
|
case "notice":
|
||||||
|
// fmt.Println("noticeMarquee")
|
||||||
|
res, err = database.RedisCli.HGet(database.RedisCtx, "temp_dataset", "item_marquee_result").Result()
|
||||||
|
case "user":
|
||||||
|
// fmt.Println("getNavi")
|
||||||
|
res, err = database.RedisCli.HGet(database.RedisCtx, "temp_dataset", "user_intro_result").Result()
|
||||||
|
case "navigation":
|
||||||
|
// fmt.Println("specialCutin")
|
||||||
|
res, err = database.RedisCli.HGet(database.RedisCtx, "temp_dataset", "special_cutin_result").Result()
|
||||||
|
case "award":
|
||||||
|
// fmt.Println("awardInfo")
|
||||||
|
res, err = database.RedisCli.HGet(database.RedisCtx, "temp_dataset", "award_result").Result()
|
||||||
|
case "background":
|
||||||
|
// fmt.Println("backgroundInfo")
|
||||||
|
res, err = database.RedisCli.HGet(database.RedisCtx, "temp_dataset", "background_result").Result()
|
||||||
|
case "stamp":
|
||||||
|
// fmt.Println("stampInfo")
|
||||||
|
res, err = database.RedisCli.HGet(database.RedisCtx, "temp_dataset", "stamp_result").Result()
|
||||||
|
case "exchange":
|
||||||
|
// fmt.Println("owningPoint")
|
||||||
|
res, err = database.RedisCli.HGet(database.RedisCtx, "temp_dataset", "exchange_point_result").Result()
|
||||||
|
case "livese":
|
||||||
|
// fmt.Println("liveseInfo")
|
||||||
|
res, err = database.RedisCli.HGet(database.RedisCtx, "temp_dataset", "live_se_result").Result()
|
||||||
|
case "liveicon":
|
||||||
|
// fmt.Println("liveiconInfo")
|
||||||
|
res, err = database.RedisCli.HGet(database.RedisCtx, "temp_dataset", "live_icon_result").Result()
|
||||||
|
case "item":
|
||||||
|
// fmt.Println("list")
|
||||||
|
res, err = database.RedisCli.HGet(database.RedisCtx, "temp_dataset", "item_list_result").Result()
|
||||||
|
case "marathon":
|
||||||
|
// fmt.Println("marathonInfo")
|
||||||
|
res, err = database.RedisCli.HGet(database.RedisCtx, "temp_dataset", "marathon_result").Result()
|
||||||
|
case "challenge":
|
||||||
|
// fmt.Println("challengeInfo")
|
||||||
|
res, err = database.RedisCli.HGet(database.RedisCtx, "temp_dataset", "challenge_result").Result()
|
||||||
|
case "museum":
|
||||||
|
// fmt.Println("info")
|
||||||
|
res, err = database.RedisCli.HGet(database.RedisCtx, "temp_dataset", "museum_result").Result()
|
||||||
|
default:
|
||||||
|
// fmt.Println("Fuck you!")
|
||||||
|
err = errors.New("invalid option")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
var result interface{}
|
||||||
|
err = json.Unmarshal([]byte(res), &result)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
results = append(results, result)
|
||||||
}
|
}
|
||||||
|
// fmt.Println(results)
|
||||||
|
b, err := json.Marshal(results)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
rp := model.Response{
|
||||||
|
ResponseData: b,
|
||||||
|
ReleaseInfo: []interface{}{},
|
||||||
|
StatusCode: 200,
|
||||||
|
}
|
||||||
|
b, err = json.Marshal(rp)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
// fmt.Println(string(b))
|
||||||
|
|
||||||
ctx.Header("Server-Version", "97.4.6")
|
ctx.Header("Server-Version", "97.4.6")
|
||||||
ctx.Header("user_id", "5802913")
|
ctx.Header("user_id", "3241988")
|
||||||
if v1 {
|
ctx.Header("authorize", "consumerKey=lovelive_test&timeStamp=1678640521&version=1.1&token=bS5G6TKTsw0aGxVQz8JWJTx8Tf73H0bF9Bq1PEw3UaxoEoUG8GcrrzaEbjOwEQJTrThgHpBlbwnMRl9ITGw1&nonce=9&requestTimeStamp=1678640521")
|
||||||
// 登录后第一次请求API
|
ctx.Header("X-Message-Sign", "bNuSClKqt20FoGduZJI4pB1Y8xUwrrarvfsq0soqU5U97x7kGLESNoXSQVZcFfa1Eo4kgntEktokmDHzCbxpsYFvrD1mhbn++UOmcwXXCQRdxbbfhTt7MVfXbcqXAuFKAfkE37n9dkn1U0RnNt5U4m3mbRhLYT5B16ZcPGIPn/E=")
|
||||||
ctx.Header("authorize", "consumerKey=lovelive_test&timeStamp=1678640521&version=1.1&token=bS5G6TKTsw0aGxVQz8JWJTx8Tf73H0bF9Bq1PEw3UaxoEoUG8GcrrzaEbjOwEQJTrThgHpBlbwnMRl9ITGw1&nonce=9&requestTimeStamp=1678640521")
|
ctx.String(http.StatusOK, string(b))
|
||||||
// ctx.Header("X-Message-Sign", "bNuSClKqt20FoGduZJI4pB1Y8xUwrrarvfsq0soqU5U97x7kGLESNoXSQVZcFfa1Eo4kgntEktokmDHzCbxpsYFvrD1mhbn++UOmcwXXCQRdxbbfhTt7MVfXbcqXAuFKAfkE37n9dkn1U0RnNt5U4m3mbRhLYT5B16ZcPGIPn/E=")
|
|
||||||
ctx.String(http.StatusOK, utils.ReadAllText("data/test2.json"))
|
|
||||||
} else {
|
|
||||||
// 登录后第二次请求API
|
|
||||||
ctx.Header("authorize", "consumerKey=lovelive_test&timeStamp=1678640523&version=1.1&token=bS5G6TKTsw0aGxVQz8JWJTx8Tf73H0bF9Bq1PEw3UaxoEoUG8GcrrzaEbjOwEQJTrThgHpBlbwnMRl9ITGw1&nonce=10&requestTimeStamp=1678640523")
|
|
||||||
// ctx.Header("X-Message-Sign", "w6+DlFx4DcmaoNXoLu71PH9sOOQeGFX/x0aDayt0qpHa+Uw+MeA0EJossW3/OgZvZgcFxBK2tKrHZJxRrguwCp0lpaI6/onWrYhK9xZeAW33nrsuWWT52v4wyNPY236xGecrDrs9R0nmTOuxElQEKqdFeZYL/JZiuuxvUbwxMy8=")
|
|
||||||
ctx.String(http.StatusOK, resp.Api2)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-5
@@ -1,15 +1,15 @@
|
|||||||
package handler
|
package handler
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"honoka-chan/resp"
|
"honoka-chan/utils"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
func DownloadEventHandler(ctx *gin.Context) {
|
func DownloadEventHandler(ctx *gin.Context) {
|
||||||
ctx.Header("user_id", "5802913")
|
ctx.Header("user_id", "3241988")
|
||||||
ctx.Header("authorize", "consumerKey=lovelive_test&timeStamp=1678640521&version=1.1&token=bS5G6TKTsw0aGxVQz8JWJTx8Tf73H0bF9Bq1PEw3UaxoEoUG8GcrrzaEbjOwEQJTrThgHpBlbwnMRl9ITGw1&nonce=7&requestTimeStamp=1678640521")
|
ctx.Header("authorize", "consumerKey=lovelive_test&timeStamp=1679236701&version=1.1&token=cHPoOHP5dAs2dh30EkOW8FndO07xlpKHrDRdVOtT7Whlo1opiEMXSwk1JJdAFd4cSeKQvGVRwH2Z7sFh1gnz3gd&nonce=8&requestTimeStamp=1679236698")
|
||||||
ctx.Header("X-Message-Sign", "anBqaPYp7nEprAbxhOouwx8e1dCn1PbmXNplSVtGT3QWNvS+bcMYnqr8QxluM5SIGi3esO8tzHsDzn+Z7tdohFtpkT1zdYQ5qK07eZ8VtyckaRnmx5QLzn7MMflFWr3P/HONS04QwLakoeZyNDCBmxjqOy6QzNsf6e4o9D+21AM=")
|
ctx.Header("X-Message-Sign", "rFJdTYrGPvG9V/IESgiAZu4qod4VgVTe5/oj8/5fA2mzXhJkKAD7nE8IOI9MQmjwECFYRc4KLPjtqsxuosloIjxTk6pHiAPtGvzkajqBivbbaBIB2OdIZQarqMRURN5M0TGLOC0vzO9xP5fYKJzMHSskJsmMdunPWLkUz3eqoZU=")
|
||||||
ctx.String(http.StatusOK, resp.Event)
|
ctx.String(http.StatusOK, utils.ReadAllText("assets/event.json"))
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-5
@@ -1,7 +1,7 @@
|
|||||||
package handler
|
package handler
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"honoka-chan/resp"
|
"honoka-chan/utils"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
@@ -9,8 +9,8 @@ import (
|
|||||||
|
|
||||||
func GdprHandler(ctx *gin.Context) {
|
func GdprHandler(ctx *gin.Context) {
|
||||||
ctx.Header("Server-Version", "97.4.6")
|
ctx.Header("Server-Version", "97.4.6")
|
||||||
ctx.Header("user_id", "5802913")
|
ctx.Header("user_id", "3241988")
|
||||||
ctx.Header("authorize", "consumerKey=lovelive_test&timeStamp=1678640520&version=1.1&token=bS5G6TKTsw0aGxVQz8JWJTx8Tf73H0bF9Bq1PEw3UaxoEoUG8GcrrzaEbjOwEQJTrThgHpBlbwnMRl9ITGw1&nonce=4&requestTimeStamp=1678640520")
|
ctx.Header("authorize", "consumerKey=lovelive_test&timeStamp=1679236700&version=1.1&token=cHPoOHP5dAs2dh30EkOW8FndO07xlpKHrDRdVOtT7Whlo1opiEMXSwk1JJdAFd4cSeKQvGVRwH2Z7sFh1gnz3gd&nonce=4&requestTimeStamp=1679236697")
|
||||||
ctx.Header("X-Message-Sign", "nGH0cQ34z9D3QnTGFDe2r2WMBGfTzYx+5oaJJbvYCqMESTDAQWlxq8X73OBLgdCkEIMuIAiRyF0z+0MQEVohDL4l6nDgcVDDJztCXP/W5ZXZh1wNgGhHZIDrwboNjsg1acq0+phBAiBEQQt6HipEdGRQh5fhAhhA717ns/C4iUI=")
|
ctx.Header("X-Message-Sign", "El2L/coKTfbHF8shto7SjxnukwicN1BtIMhvD21uKy+9ISwH0G2fI4aCemKn77o54H2zv+mVN4osDK0N0Zi86lGyx0rFXMlQ75D7XKX5KbWAhHcgn+W8t6tk2R0PVUyEeo1gtHgjNauT1asNK+PDJ7h3WWINPFgfVSnldCUnYLk=")
|
||||||
ctx.String(http.StatusOK, resp.Gdpr)
|
ctx.String(http.StatusOK, utils.ReadAllText("assets/gdpr.json"))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,28 +1,5 @@
|
|||||||
package handler
|
package handler
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"honoka-chan/config"
|
|
||||||
|
|
||||||
"github.com/redis/go-redis/v9"
|
|
||||||
)
|
|
||||||
|
|
||||||
var (
|
var (
|
||||||
nonce = 0
|
nonce = 0
|
||||||
|
|
||||||
redisCli *redis.Client
|
|
||||||
redisCtx = context.Background()
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
|
||||||
redisCli = redis.NewClient(&redis.Options{
|
|
||||||
Addr: config.Conf.Redis.Host + ":" + config.Conf.Redis.Port,
|
|
||||||
Password: config.Conf.Redis.Pass,
|
|
||||||
DB: config.Conf.Redis.Db,
|
|
||||||
})
|
|
||||||
|
|
||||||
_, err := redisCli.Ping(redisCtx).Result()
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
+5
-5
@@ -1,7 +1,7 @@
|
|||||||
package handler
|
package handler
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"honoka-chan/resp"
|
"honoka-chan/utils"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
@@ -9,8 +9,8 @@ import (
|
|||||||
|
|
||||||
func LBonusExecuteHandler(ctx *gin.Context) {
|
func LBonusExecuteHandler(ctx *gin.Context) {
|
||||||
ctx.Header("Server-Version", "97.4.6")
|
ctx.Header("Server-Version", "97.4.6")
|
||||||
ctx.Header("user_id", "5802913")
|
ctx.Header("user_id", "3241988")
|
||||||
ctx.Header("authorize", "consumerKey=lovelive_test&timeStamp=1678640521&version=1.1&token=bS5G6TKTsw0aGxVQz8JWJTx8Tf73H0bF9Bq1PEw3UaxoEoUG8GcrrzaEbjOwEQJTrThgHpBlbwnMRl9ITGw1&nonce=8&requestTimeStamp=1678640521")
|
ctx.Header("authorize", "consumerKey=lovelive_test&timeStamp=1679236701&version=1.1&token=cHPoOHP5dAs2dh30EkOW8FndO07xlpKHrDRdVOtT7Whlo1opiEMXSwk1JJdAFd4cSeKQvGVRwH2Z7sFh1gnz3gd&nonce=9&requestTimeStamp=1679236698")
|
||||||
ctx.Header("X-Message-Sign", "2UDMPncUOcUnQdLPCSuZIrRWK9yRgASUzCL3YiMpox/IUDNrHn7BRr/eo6iMQ1TlDTnNqzHj/ZP/8m4rpgvlDFHg16nlPUQJe0hqF9Ck3tjeHfT7wbwV75deoqIlPNONS5u3eCI8ZlhRf9VeDUBxRoVDRiq4xqiwjOILvmPAb1w=")
|
ctx.Header("X-Message-Sign", "pV5H3WfRtj2zpDYuYwt9BuB8jMUJiXrGXQbsemJA+8sX7/c9s4mnbMFTKDD3cxK1mSeCLNhJVtR1M6QKZVgbCjyQGSVPR1EG1cTumR9T5LFF6ighJWV7EEYxbeYgJjAEcjVHOgB3d2hy7SK7u4oCatEgXhbJMQYGV5lH2gdwEpw=")
|
||||||
ctx.String(http.StatusOK, resp.LBonus)
|
ctx.String(http.StatusOK, utils.ReadAllText("assets/lbonus.json"))
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-3
@@ -4,6 +4,7 @@ import (
|
|||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"honoka-chan/database"
|
||||||
"honoka-chan/encrypt"
|
"honoka-chan/encrypt"
|
||||||
"honoka-chan/model"
|
"honoka-chan/model"
|
||||||
"honoka-chan/utils"
|
"honoka-chan/utils"
|
||||||
@@ -48,7 +49,7 @@ func AuthKeyHandler(ctx *gin.Context) {
|
|||||||
"server_token": serverToken,
|
"server_token": serverToken,
|
||||||
"nonce": nonce,
|
"nonce": nonce,
|
||||||
}
|
}
|
||||||
_, err = redisCli.HSet(redisCtx, authorizeToken, authData).Result()
|
_, err = database.RedisCli.HSet(database.RedisCtx, authorizeToken, authData).Result()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
@@ -94,7 +95,7 @@ func LoginHandler(ctx *gin.Context) {
|
|||||||
ctx.String(http.StatusForbidden, "Fuck you!")
|
ctx.String(http.StatusForbidden, "Fuck you!")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
authData, err := redisCli.HGetAll(redisCtx, authToken[0]).Result()
|
authData, err := database.RedisCli.HGetAll(database.RedisCtx, authToken[0]).Result()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
@@ -134,7 +135,7 @@ func LoginHandler(ctx *gin.Context) {
|
|||||||
nonce++
|
nonce++
|
||||||
|
|
||||||
authorizeToken := utils.RandomBase64Token(32)
|
authorizeToken := utils.RandomBase64Token(32)
|
||||||
uid, err := redisCli.HGet(redisCtx, "login_key_uid", string(keyDescrypted)).Result()
|
uid, err := database.RedisCli.HGet(database.RedisCtx, "login_key_uid", string(keyDescrypted)).Result()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ctx.String(http.StatusForbidden, "Fuck you!")
|
ctx.String(http.StatusForbidden, "Fuck you!")
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package handler
|
package handler
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"honoka-chan/resp"
|
"honoka-chan/utils"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
@@ -9,8 +9,8 @@ import (
|
|||||||
|
|
||||||
func PersonalNoticeHandler(ctx *gin.Context) {
|
func PersonalNoticeHandler(ctx *gin.Context) {
|
||||||
ctx.Header("Server-Version", "97.4.6")
|
ctx.Header("Server-Version", "97.4.6")
|
||||||
ctx.Header("user_id", "5802913")
|
ctx.Header("user_id", "3241988")
|
||||||
ctx.Header("authorize", "consumerKey=lovelive_test&timeStamp=1678640520&version=1.1&token=bS5G6TKTsw0aGxVQz8JWJTx8Tf73H0bF9Bq1PEw3UaxoEoUG8GcrrzaEbjOwEQJTrThgHpBlbwnMRl9ITGw1&nonce=5&requestTimeStamp=1678640520")
|
ctx.Header("authorize", "consumerKey=lovelive_test&timeStamp=1679236701&version=1.1&token=cHPoOHP5dAs2dh30EkOW8FndO07xlpKHrDRdVOtT7Whlo1opiEMXSwk1JJdAFd4cSeKQvGVRwH2Z7sFh1gnz3gd&nonce=5&requestTimeStamp=1679236697")
|
||||||
ctx.Header("X-Message-Sign", "c/J6CJPZZeGk44VLWkgCfamhFFKlLheu4e2ga2KrEl6DkVyotQTDte39RGMJS+kd5qRg/nSh/QdRGEfMLIeXB2xj3TT/UB1a03wV6slr39B+Xd2ip8BiuDKxmqpw3ESdK25WdlY+fMXbXc4RkkrleqElME7jw+VZ2SiwIgiedNg=")
|
ctx.Header("X-Message-Sign", "mTvY9EUM4LAomFxHQPINslVF8KBJ/nWZvCmVzYYyFln+M23/T05cuT/E6FUt9ExwmGMFy6TqtbZwcoomFWaEm38uJH2nQy/3RDjS0L26AsyFOHDIUOK11a4qHxv309sRjb04KhckTmzJERTooCnRturTYcNYet0g01vz2Geu4Ew=")
|
||||||
ctx.String(http.StatusOK, resp.Gdpr)
|
ctx.String(http.StatusOK, utils.ReadAllText("assets/personalnotice.json"))
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@ func ScenarioStartupHandler(ctx *gin.Context) {
|
|||||||
ctx.Header("X-Powered-By", "KLab Native APP Platform")
|
ctx.Header("X-Powered-By", "KLab Native APP Platform")
|
||||||
ctx.Header("server_version", "20120129")
|
ctx.Header("server_version", "20120129")
|
||||||
ctx.Header("Server-Version", "97.4.6")
|
ctx.Header("Server-Version", "97.4.6")
|
||||||
ctx.Header("user_id", "5802913")
|
ctx.Header("user_id", "3241988")
|
||||||
ctx.Header("version_up", "0")
|
ctx.Header("version_up", "0")
|
||||||
ctx.Header("status_code", "200")
|
ctx.Header("status_code", "200")
|
||||||
ctx.Header("authorize", "consumerKey=lovelive_test&timeStamp=1678786443&version=1.1&token=2gjbstqCHAlIv600Pk0AJN5uvfPYgLvfSKB418sMIoclOy1M9UP7LUC1CG14tPicVzOq2MBOXLvpmNRwyWIi9Qf&nonce=17&requestTimeStamp=1678786443")
|
ctx.Header("authorize", "consumerKey=lovelive_test&timeStamp=1678786443&version=1.1&token=2gjbstqCHAlIv600Pk0AJN5uvfPYgLvfSKB418sMIoclOy1M9UP7LUC1CG14tPicVzOq2MBOXLvpmNRwyWIi9Qf&nonce=17&requestTimeStamp=1678786443")
|
||||||
|
|||||||
+5
-5
@@ -1,15 +1,15 @@
|
|||||||
package handler
|
package handler
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"honoka-chan/resp"
|
"honoka-chan/utils"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TosCheckHandler(ctx *gin.Context) {
|
func TosCheckHandler(ctx *gin.Context) {
|
||||||
ctx.Header("user_id", "5802913")
|
ctx.Header("user_id", "3241988")
|
||||||
ctx.Header("authorize", "consumerKey=lovelive_test&timeStamp=1678640520&version=1.1&token=bS5G6TKTsw0aGxVQz8JWJTx8Tf73H0bF9Bq1PEw3UaxoEoUG8GcrrzaEbjOwEQJTrThgHpBlbwnMRl9ITGw1&nonce=6&requestTimeStamp=1678640520")
|
ctx.Header("authorize", "consumerKey=lovelive_test&timeStamp=1679236701&version=1.1&token=cHPoOHP5dAs2dh30EkOW8FndO07xlpKHrDRdVOtT7Whlo1opiEMXSwk1JJdAFd4cSeKQvGVRwH2Z7sFh1gnz3gd&nonce=6&requestTimeStamp=1679236698")
|
||||||
ctx.Header("X-Message-Sign", "lHGAUrSt27AAUkeB+WJCSLjs9xZdyNnDRlZVZ0VRXFhqDnVBag0lwSQEUQoedh3/FyIHazbfjuTJw9REsgSJwX05I7GW7KoqPIYNoRLiLgjM6Y7MOZWrpVdipWl0q7IPS3mKyL8ye6sRZ8TfWx8cFfnohp3U7FnvrAEWdh1h71I=")
|
ctx.Header("X-Message-Sign", "3OYeXseR08OvVJfG9cEU6CbEXwbjAhL93vTEL6G4i3FqCY5wpELp0XR8FVZeHo7wsO9UI3+5JJZylnlWvaPgaXej2oefsk5cWHO2rKvrPxaqWRfz5YeGZBvXQejY81KgRRZBWZaQBlHEacH+aILl608xwQGQ98wGtyyMYfOf4Ss=")
|
||||||
ctx.String(http.StatusOK, resp.TosCheck)
|
ctx.String(http.StatusOK, utils.ReadAllText("assets/toscheck.json"))
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -9,7 +9,7 @@ import (
|
|||||||
|
|
||||||
func SetNotificationTokenHandler(ctx *gin.Context) {
|
func SetNotificationTokenHandler(ctx *gin.Context) {
|
||||||
ctx.Header("Server-Version", "97.4.6")
|
ctx.Header("Server-Version", "97.4.6")
|
||||||
ctx.Header("user_id", "5802913")
|
ctx.Header("user_id", "3241988")
|
||||||
ctx.Header("authorize", "consumerKey=lovelive_test&timeStamp=1678891478&version=1.1&token=cTMEyAfIDErcKUyCgBM6ZuJv8UBRgSzG4z4MfqYhR7xSHBYhIA9ofaVKtSefeiP2LTKIfbnCfE5dppYw8Af&nonce=18&requestTimeStamp=1678891478")
|
ctx.Header("authorize", "consumerKey=lovelive_test&timeStamp=1678891478&version=1.1&token=cTMEyAfIDErcKUyCgBM6ZuJv8UBRgSzG4z4MfqYhR7xSHBYhIA9ofaVKtSefeiP2LTKIfbnCfE5dppYw8Af&nonce=18&requestTimeStamp=1678891478")
|
||||||
ctx.Header("X-Message-Sign", "bNZj/YjRADDccb5vcF/NHI9Kin3bkM3ECBQdxttXvCBqzoSBX6yWuEn9Fsjx+Yp3g2D9CcONZzqJlAvXbatGHJkbClSXuomLXVOcNmQYgidjyUvC7CceoSvCbL8U4Ge12tyGd8V2EMHVZfxqPKdHsJSGaOFbUpmo7wAhKVfuEjg=")
|
ctx.Header("X-Message-Sign", "bNZj/YjRADDccb5vcF/NHI9Kin3bkM3ECBQdxttXvCBqzoSBX6yWuEn9Fsjx+Yp3g2D9CcONZzqJlAvXbatGHJkbClSXuomLXVOcNmQYgidjyUvC7CceoSvCbL8U4Ge12tyGd8V2EMHVZfxqPKdHsJSGaOFbUpmo7wAhKVfuEjg=")
|
||||||
ctx.String(http.StatusOK, resp.NotificationToken)
|
ctx.String(http.StatusOK, resp.NotificationToken)
|
||||||
|
|||||||
+5
-5
@@ -1,7 +1,7 @@
|
|||||||
package handler
|
package handler
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"honoka-chan/resp"
|
"honoka-chan/utils"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
@@ -9,8 +9,8 @@ import (
|
|||||||
|
|
||||||
func UserInfoHandler(ctx *gin.Context) {
|
func UserInfoHandler(ctx *gin.Context) {
|
||||||
ctx.Header("Server-Version", "97.4.6")
|
ctx.Header("Server-Version", "97.4.6")
|
||||||
ctx.Header("user_id", "5802913")
|
ctx.Header("user_id", "3241988")
|
||||||
ctx.Header("authorize", "consumerKey=lovelive_test&timeStamp=1678640520&version=1.1&token=bS5G6TKTsw0aGxVQz8JWJTx8Tf73H0bF9Bq1PEw3UaxoEoUG8GcrrzaEbjOwEQJTrThgHpBlbwnMRl9ITGw1&nonce=3&requestTimeStamp=1678640520")
|
ctx.Header("authorize", "consumerKey=lovelive_test&timeStamp=1679236700&version=1.1&token=cHPoOHP5dAs2dh30EkOW8FndO07xlpKHrDRdVOtT7Whlo1opiEMXSwk1JJdAFd4cSeKQvGVRwH2Z7sFh1gnz3gd&nonce=3&requestTimeStamp=1679236697")
|
||||||
ctx.Header("X-Message-Sign", "oa9sisoLJILWOKto4CAfb1jJwzoozpkpIAhnXl3s6m5jy75Zyb8tM+Jds6rqytnJt/labC/hFH0dhna/qqGbnTeLq6zUwHrTf8crz4uwtVi8qOBwvSbtA1dgbiKJr9raAflgJOQj6cft7XGP4bdkYfbuNxPS9gFhK+MG7b8S3Z8=")
|
ctx.Header("X-Message-Sign", "mGcmcvrm22pt5zJw1CJxe/6Y9R4aZPb6znja4jxioWHlinjWU5nEq61qyslW0bX6uVWTifz17eSDdidlJHccusbQaKXOyoFfbQC1hpArv97b3RJGrnDK7iShPOTz3+mwYiUhtXrJ3oohRGH1siEG0G3H4pSK3JHnAbPlF84cR4w=")
|
||||||
ctx.String(http.StatusOK, resp.UserInfo)
|
ctx.String(http.StatusOK, utils.ReadAllText("assets/userinfo.json"))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import (
|
|||||||
"honoka-chan/handler"
|
"honoka-chan/handler"
|
||||||
"honoka-chan/middleware"
|
"honoka-chan/middleware"
|
||||||
"honoka-chan/sifcap"
|
"honoka-chan/sifcap"
|
||||||
|
"honoka-chan/tools"
|
||||||
"honoka-chan/xclog"
|
"honoka-chan/xclog"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
@@ -15,59 +16,8 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
// test
|
tools.AnalysisApi1Data("assets/api1.json")
|
||||||
// apiData := utils.ReadAllText("data/api1.json")
|
tools.AnalysisApi2Data("assets/api2.json")
|
||||||
// var obj model.Response
|
|
||||||
// err := json.Unmarshal([]byte(apiData), &obj)
|
|
||||||
// if err != nil {
|
|
||||||
// panic(err)
|
|
||||||
// }
|
|
||||||
|
|
||||||
// var data interface{}
|
|
||||||
// err = json.Unmarshal(obj.ResponseData, &data)
|
|
||||||
// if err != nil {
|
|
||||||
// panic(err)
|
|
||||||
// }
|
|
||||||
// resultType := reflect.TypeOf(data)
|
|
||||||
// // fmt.Println(resultType.Kind())
|
|
||||||
// if resultType.Kind() == reflect.Map {
|
|
||||||
// data = data.(map[string]interface{})
|
|
||||||
// }
|
|
||||||
// result := data.([]interface{})
|
|
||||||
// for k, v := range result {
|
|
||||||
// m, err := json.Marshal(v)
|
|
||||||
// if err != nil {
|
|
||||||
// panic(err)
|
|
||||||
// }
|
|
||||||
|
|
||||||
// switch k {
|
|
||||||
// case 0:
|
|
||||||
// res := model.LiveStatusResp{}
|
|
||||||
// err = json.Unmarshal(m, &res)
|
|
||||||
// if err != nil {
|
|
||||||
// panic(err)
|
|
||||||
// }
|
|
||||||
// // fmt.Println(res.Result.NormalLiveStatusList[0].HiScore)
|
|
||||||
// case 1:
|
|
||||||
// res := model.LiveScheduleResp{}
|
|
||||||
// err = json.Unmarshal(m, &res)
|
|
||||||
// if err != nil {
|
|
||||||
// panic(err)
|
|
||||||
// }
|
|
||||||
// // fmt.Println(res.Result.LiveList[0].StartDate)
|
|
||||||
// case 2:
|
|
||||||
// res := model.UnitAllResp{}
|
|
||||||
// err = json.Unmarshal(m, &res)
|
|
||||||
// if err != nil {
|
|
||||||
// panic(err)
|
|
||||||
// }
|
|
||||||
// for _, vv := range res.Result.Active {
|
|
||||||
// if vv.MaxLevel == 120 {
|
|
||||||
// fmt.Println(vv)
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
if config.Conf.SifCap.Enabled {
|
if config.Conf.SifCap.Enabled {
|
||||||
sifcap.Start()
|
sifcap.Start()
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package model
|
||||||
|
|
||||||
|
// module: album, action: albumAll
|
||||||
|
type AlbumAll struct {
|
||||||
|
UnitID int `json:"unit_id"`
|
||||||
|
RankMaxFlag bool `json:"rank_max_flag"`
|
||||||
|
LoveMaxFlag bool `json:"love_max_flag"`
|
||||||
|
RankLevelMaxFlag bool `json:"rank_level_max_flag"`
|
||||||
|
AllMaxFlag bool `json:"all_max_flag"`
|
||||||
|
HighestLovePerUnit int `json:"highest_love_per_unit"`
|
||||||
|
TotalLove int `json:"total_love"`
|
||||||
|
FavoritePoint int `json:"favorite_point"`
|
||||||
|
SignFlag bool `json:"sign_flag"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type AlbumAllResult struct {
|
||||||
|
AlbumAll []AlbumAll
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package model
|
||||||
|
|
||||||
|
// module: banner, action: bannerList
|
||||||
|
type BannerList struct {
|
||||||
|
BannerType int `json:"banner_type"`
|
||||||
|
TargetID int `json:"target_id"`
|
||||||
|
AssetPath string `json:"asset_path"`
|
||||||
|
FixedFlag bool `json:"fixed_flag"`
|
||||||
|
BackSide bool `json:"back_side"`
|
||||||
|
BannerID int `json:"banner_id"`
|
||||||
|
StartDate string `json:"start_date"`
|
||||||
|
EndDate string `json:"end_date"`
|
||||||
|
AddUnitStartDate string `json:"add_unit_start_date,omitempty"`
|
||||||
|
WebviewURL string `json:"webview_url,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type BannerListResult struct {
|
||||||
|
TimeLimit string `json:"time_limit"`
|
||||||
|
BannerList []BannerList `json:"banner_list"`
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package model
|
||||||
|
|
||||||
|
// module: costume, action: costumeList
|
||||||
|
type CostumeList struct {
|
||||||
|
UnitID int `json:"unit_id"`
|
||||||
|
IsRankMax bool `json:"is_rank_max"`
|
||||||
|
IsSigned bool `json:"is_signed"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type CostumeListResult struct {
|
||||||
|
CostumeList []CostumeList `json:"costume_list"`
|
||||||
|
}
|
||||||
-518
@@ -1,518 +0,0 @@
|
|||||||
package model
|
|
||||||
|
|
||||||
import "encoding/json"
|
|
||||||
|
|
||||||
// module: live, action: liveStatus
|
|
||||||
type NormalLiveStatusList struct {
|
|
||||||
LiveDifficultyID int `json:"live_difficulty_id"`
|
|
||||||
Status int `json:"status"`
|
|
||||||
HiScore int `json:"hi_score"`
|
|
||||||
HiComboCount int `json:"hi_combo_count"`
|
|
||||||
ClearCnt int `json:"clear_cnt"`
|
|
||||||
AchievedGoalIDList []int `json:"achieved_goal_id_list"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type SpecialLiveStatusList struct {
|
|
||||||
LiveDifficultyID int `json:"live_difficulty_id"`
|
|
||||||
Status int `json:"status"`
|
|
||||||
HiScore int `json:"hi_score"`
|
|
||||||
HiComboCount int `json:"hi_combo_count"`
|
|
||||||
ClearCnt int `json:"clear_cnt"`
|
|
||||||
AchievedGoalIDList []int `json:"achieved_goal_id_list"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type TrainingLiveStatusList struct {
|
|
||||||
LiveDifficultyID int `json:"live_difficulty_id"`
|
|
||||||
Status int `json:"status"`
|
|
||||||
HiScore int `json:"hi_score"`
|
|
||||||
HiComboCount int `json:"hi_combo_count"`
|
|
||||||
ClearCnt int `json:"clear_cnt"`
|
|
||||||
AchievedGoalIDList []int `json:"achieved_goal_id_list"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type LiveStatusResult struct {
|
|
||||||
NormalLiveStatusList []NormalLiveStatusList `json:"normal_live_status_list"`
|
|
||||||
SpecialLiveStatusList []SpecialLiveStatusList `json:"special_live_status_list"`
|
|
||||||
TrainingLiveStatusList []TrainingLiveStatusList `json:"training_live_status_list"`
|
|
||||||
MarathonLiveStatusList []interface{} `json:"marathon_live_status_list"`
|
|
||||||
FreeLiveStatusList []interface{} `json:"free_live_status_list"`
|
|
||||||
CanResumeLive bool `json:"can_resume_live"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type LiveStatusResp struct {
|
|
||||||
Result LiveStatusResult `json:"result"`
|
|
||||||
Status int `json:"status"`
|
|
||||||
CommandNum bool `json:"commandNum"`
|
|
||||||
TimeStamp int64 `json:"timeStamp"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// module: live, action: schedule
|
|
||||||
type LiveList struct {
|
|
||||||
LiveDifficultyID int `json:"live_difficulty_id"`
|
|
||||||
StartDate string `json:"start_date"`
|
|
||||||
EndDate string `json:"end_date"`
|
|
||||||
IsRandom bool `json:"is_random"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type LimitedBonusCommonList struct {
|
|
||||||
LiveType int `json:"live_type"`
|
|
||||||
LimitedBonusType int `json:"limited_bonus_type"`
|
|
||||||
LimitedBonusValue int `json:"limited_bonus_value"`
|
|
||||||
StartDate string `json:"start_date"`
|
|
||||||
EndDate string `json:"end_date"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type RandomLiveList struct {
|
|
||||||
AttributeID int `json:"attribute_id"`
|
|
||||||
StartDate string `json:"start_date"`
|
|
||||||
EndDate string `json:"end_date"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type TrainingLiveList struct {
|
|
||||||
LiveDifficultyID int `json:"live_difficulty_id"`
|
|
||||||
StartDate string `json:"start_date"`
|
|
||||||
IsRandom bool `json:"is_random"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type LiveScheduleResult struct {
|
|
||||||
EventList []interface{} `json:"event_list"`
|
|
||||||
LiveList []LiveList `json:"live_list"`
|
|
||||||
LimitedBonusList []interface{} `json:"limited_bonus_list"`
|
|
||||||
LimitedBonusCommonList []LimitedBonusCommonList `json:"limited_bonus_common_list"`
|
|
||||||
RandomLiveList []RandomLiveList `json:"random_live_list"`
|
|
||||||
FreeLiveList []interface{} `json:"free_live_list"`
|
|
||||||
TrainingLiveList []TrainingLiveList `json:"training_live_list"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type LiveScheduleResp struct {
|
|
||||||
Result LiveScheduleResult `json:"result"`
|
|
||||||
Status int `json:"status"`
|
|
||||||
CommandNum bool `json:"commandNum"`
|
|
||||||
TimeStamp int64 `json:"timeStamp"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// module: unit, action: unitAll
|
|
||||||
type Costume struct {
|
|
||||||
UnitID int `json:"unit_id"`
|
|
||||||
IsRankMax bool `json:"is_rank_max"`
|
|
||||||
IsSigned bool `json:"is_signed"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type Active struct {
|
|
||||||
UnitOwningUserID int `json:"unit_owning_user_id"`
|
|
||||||
UnitID int `json:"unit_id"`
|
|
||||||
Exp int `json:"exp"`
|
|
||||||
NextExp int `json:"next_exp"`
|
|
||||||
Level int `json:"level"`
|
|
||||||
MaxLevel int `json:"max_level"`
|
|
||||||
LevelLimitID int `json:"level_limit_id"`
|
|
||||||
Rank int `json:"rank"`
|
|
||||||
MaxRank int `json:"max_rank"`
|
|
||||||
Love int `json:"love"`
|
|
||||||
MaxLove int `json:"max_love"`
|
|
||||||
UnitSkillExp int `json:"unit_skill_exp"`
|
|
||||||
UnitSkillLevel int `json:"unit_skill_level"`
|
|
||||||
MaxHp int `json:"max_hp"`
|
|
||||||
UnitRemovableSkillCapacity int `json:"unit_removable_skill_capacity"`
|
|
||||||
FavoriteFlag bool `json:"favorite_flag"`
|
|
||||||
DisplayRank int `json:"display_rank"`
|
|
||||||
IsRankMax bool `json:"is_rank_max"`
|
|
||||||
IsLoveMax bool `json:"is_love_max"`
|
|
||||||
IsLevelMax bool `json:"is_level_max"`
|
|
||||||
IsSigned bool `json:"is_signed"`
|
|
||||||
IsSkillLevelMax bool `json:"is_skill_level_max"`
|
|
||||||
IsRemovableSkillCapacityMax bool `json:"is_removable_skill_capacity_max"`
|
|
||||||
InsertDate string `json:"insert_date"`
|
|
||||||
Costume Costume `json:"costume,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type Waiting struct {
|
|
||||||
UnitOwningUserID int64 `json:"unit_owning_user_id"`
|
|
||||||
UnitID int `json:"unit_id"`
|
|
||||||
Exp int `json:"exp"`
|
|
||||||
NextExp int `json:"next_exp"`
|
|
||||||
Level int `json:"level"`
|
|
||||||
MaxLevel int `json:"max_level"`
|
|
||||||
LevelLimitID int `json:"level_limit_id"`
|
|
||||||
Rank int `json:"rank"`
|
|
||||||
MaxRank int `json:"max_rank"`
|
|
||||||
Love int `json:"love"`
|
|
||||||
MaxLove int `json:"max_love"`
|
|
||||||
UnitSkillExp int `json:"unit_skill_exp"`
|
|
||||||
UnitSkillLevel int `json:"unit_skill_level"`
|
|
||||||
MaxHp int `json:"max_hp"`
|
|
||||||
UnitRemovableSkillCapacity int `json:"unit_removable_skill_capacity"`
|
|
||||||
FavoriteFlag bool `json:"favorite_flag"`
|
|
||||||
DisplayRank int `json:"display_rank"`
|
|
||||||
IsRankMax bool `json:"is_rank_max"`
|
|
||||||
IsLoveMax bool `json:"is_love_max"`
|
|
||||||
IsLevelMax bool `json:"is_level_max"`
|
|
||||||
IsSigned bool `json:"is_signed"`
|
|
||||||
IsSkillLevelMax bool `json:"is_skill_level_max"`
|
|
||||||
IsRemovableSkillCapacityMax bool `json:"is_removable_skill_capacity_max"`
|
|
||||||
InsertDate string `json:"insert_date"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type UnitAllResult struct {
|
|
||||||
Active []Active `json:"active"`
|
|
||||||
Waiting []Waiting `json:"waiting"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type UnitAllResp struct {
|
|
||||||
Result UnitAllResult `json:"result"`
|
|
||||||
Status int `json:"status"`
|
|
||||||
CommandNum bool `json:"commandNum"`
|
|
||||||
TimeStamp int64 `json:"timeStamp"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// module: unit, action: deckInfo
|
|
||||||
type UnitOwningUserIds struct {
|
|
||||||
Position int `json:"position"`
|
|
||||||
UnitOwningUserID int64 `json:"unit_owning_user_id"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type UnitDeckInfo struct {
|
|
||||||
UnitDeckID int `json:"unit_deck_id"`
|
|
||||||
MainFlag bool `json:"main_flag"`
|
|
||||||
DeckName string `json:"deck_name"`
|
|
||||||
UnitOwningUserIds []UnitOwningUserIds `json:"unit_owning_user_ids"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type UnitDeckInfoResult struct {
|
|
||||||
UnitDeckInfo []UnitDeckInfo
|
|
||||||
}
|
|
||||||
|
|
||||||
// module: unit, action: supporterAll
|
|
||||||
type UnitSupportList struct {
|
|
||||||
UnitID int `json:"unit_id"`
|
|
||||||
Amount int `json:"amount"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type UnitSupporterAllResult struct {
|
|
||||||
UnitSupportList []UnitSupportList `json:"unit_support_list"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// module: unit, action: removableSkillInfo
|
|
||||||
|
|
||||||
// module: costume, action: costumeList
|
|
||||||
type CostumeList struct {
|
|
||||||
UnitID int `json:"unit_id"`
|
|
||||||
IsRankMax bool `json:"is_rank_max"`
|
|
||||||
IsSigned bool `json:"is_signed"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type CostumeListResult struct {
|
|
||||||
CostumeList []CostumeList `json:"costume_list"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// module: album, action: albumAll
|
|
||||||
type AlbumAll struct {
|
|
||||||
UnitID int `json:"unit_id"`
|
|
||||||
RankMaxFlag bool `json:"rank_max_flag"`
|
|
||||||
LoveMaxFlag bool `json:"love_max_flag"`
|
|
||||||
RankLevelMaxFlag bool `json:"rank_level_max_flag"`
|
|
||||||
AllMaxFlag bool `json:"all_max_flag"`
|
|
||||||
HighestLovePerUnit int `json:"highest_love_per_unit"`
|
|
||||||
TotalLove int `json:"total_love"`
|
|
||||||
FavoritePoint int `json:"favorite_point"`
|
|
||||||
SignFlag bool `json:"sign_flag"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type AlbumAllResult struct {
|
|
||||||
AlbumAll []AlbumAll
|
|
||||||
}
|
|
||||||
|
|
||||||
// module: scenario, action: scenarioStatus
|
|
||||||
type ScenarioStatusList struct {
|
|
||||||
ScenarioID int `json:"scenario_id"`
|
|
||||||
Status int `json:"status"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type ScenarioStatusResult struct {
|
|
||||||
ScenarioStatusList []ScenarioStatusList `json:"scenario_status_list"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// module: subscenario, action: subscenarioStatus
|
|
||||||
type SubscenarioStatusList struct {
|
|
||||||
SubscenarioID int `json:"subscenario_id"`
|
|
||||||
Status int `json:"status"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type SubscenarioStatusResult struct {
|
|
||||||
SubscenarioStatusList []SubscenarioStatusList `json:"subscenario_status_list"`
|
|
||||||
UnlockedSubscenarioIds []interface{} `json:"unlocked_subscenario_ids"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// module: eventscenario, action: status
|
|
||||||
type EventScenarioChapterList struct {
|
|
||||||
EventScenarioID int `json:"event_scenario_id"`
|
|
||||||
Chapter int `json:"chapter"`
|
|
||||||
ChapterAsset string `json:"chapter_asset"`
|
|
||||||
Status int `json:"status"`
|
|
||||||
OpenFlashFlag int `json:"open_flash_flag"`
|
|
||||||
IsReward bool `json:"is_reward"`
|
|
||||||
CostType int `json:"cost_type"`
|
|
||||||
ItemID int `json:"item_id"`
|
|
||||||
Amount int `json:"amount"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type EventScenarioList struct {
|
|
||||||
EventID int `json:"event_id"`
|
|
||||||
EventScenarioBtnAsset string `json:"event_scenario_btn_asset"`
|
|
||||||
OpenDate string `json:"open_date"`
|
|
||||||
ChapterList []EventScenarioChapterList `json:"chapter_list"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type EventScenarioStatusResult struct {
|
|
||||||
EventScenarioList []EventScenarioList `json:"event_scenario_list"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// module: multiunit, action: multiunitscenarioStatus
|
|
||||||
type MultiUnitScenarioChapterList struct {
|
|
||||||
MultiUnitScenarioID int `json:"multi_unit_scenario_id"`
|
|
||||||
Chapter int `json:"chapter"`
|
|
||||||
Status int `json:"status"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type MultiUnitScenarioStatusList struct {
|
|
||||||
MultiUnitID int `json:"multi_unit_id"`
|
|
||||||
Status int `json:"status"`
|
|
||||||
MultiUnitScenarioBtnAsset string `json:"multi_unit_scenario_btn_asset"`
|
|
||||||
OpenDate string `json:"open_date"`
|
|
||||||
ChapterList []MultiUnitScenarioChapterList `json:"chapter_list"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type MultiUnitScenarioStatusResult struct {
|
|
||||||
MultiUnitScenarioStatusList []MultiUnitScenarioStatusList `json:"multi_unit_scenario_status_list"`
|
|
||||||
UnlockedMultiUnitScenarioIds []interface{} `json:"unlocked_multi_unit_scenario_ids"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// module: payment, action: productList
|
|
||||||
type RestrictionInfo struct {
|
|
||||||
Restricted bool `json:"restricted"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type UnderAgeInfo struct {
|
|
||||||
BirthSet bool `json:"birth_set"`
|
|
||||||
HasLimit bool `json:"has_limit"`
|
|
||||||
LimitAmount interface{} `json:"limit_amount"`
|
|
||||||
MonthUsed int `json:"month_used"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type SnsProductItemList struct {
|
|
||||||
ItemID int `json:"item_id"`
|
|
||||||
AddType int `json:"add_type"`
|
|
||||||
Amount int `json:"amount"`
|
|
||||||
IsFreebie bool `json:"is_freebie"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type SnsProductList struct {
|
|
||||||
ProductID string `json:"product_id"`
|
|
||||||
Name string `json:"name"`
|
|
||||||
Price int `json:"price"`
|
|
||||||
CanBuy bool `json:"can_buy"`
|
|
||||||
ProductType int `json:"product_type"`
|
|
||||||
ItemList []SnsProductItemList `json:"item_list"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type ProductItemList struct {
|
|
||||||
ItemID int `json:"item_id"`
|
|
||||||
AddType int `json:"add_type"`
|
|
||||||
Amount int `json:"amount"`
|
|
||||||
IsFreebie bool `json:"is_freebie"`
|
|
||||||
IsRankMax bool `json:"is_rank_max,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type LimitStatus struct {
|
|
||||||
TermStartDate string `json:"term_start_date"`
|
|
||||||
RemainingTime string `json:"remaining_time"`
|
|
||||||
RemainingCount int `json:"remaining_count"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type ProductList struct {
|
|
||||||
ProductID string `json:"product_id"`
|
|
||||||
Name string `json:"name"`
|
|
||||||
BannerImgAsset string `json:"banner_img_asset"`
|
|
||||||
Price int `json:"price"`
|
|
||||||
CanBuy bool `json:"can_buy"`
|
|
||||||
ProductType int `json:"product_type"`
|
|
||||||
AnnounceURL string `json:"announce_url"`
|
|
||||||
ConfirmURL string `json:"confirm_url"`
|
|
||||||
ItemList []ProductItemList `json:"item_list"`
|
|
||||||
LimitStatus LimitStatus `json:"limit_status"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type SubscriptionItemList struct {
|
|
||||||
ItemID int `json:"item_id"`
|
|
||||||
AddType int `json:"add_type"`
|
|
||||||
Amount int `json:"amount"`
|
|
||||||
IsFreebie bool `json:"is_freebie"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type RewardList struct {
|
|
||||||
ItemID int `json:"item_id"`
|
|
||||||
AddType int `json:"add_type"`
|
|
||||||
Amount int `json:"amount"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type Items struct {
|
|
||||||
Seq int `json:"seq"`
|
|
||||||
RewardList []RewardList `json:"reward_list"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type LicenseInfo struct {
|
|
||||||
Name string `json:"name"`
|
|
||||||
Items []Items `json:"items"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type UserStatus struct {
|
|
||||||
IsLicensed bool `json:"is_licensed"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type SubscriptionStatus struct {
|
|
||||||
LicenseID int `json:"license_id"`
|
|
||||||
LicenseType int `json:"license_type"`
|
|
||||||
LicenseInfo LicenseInfo `json:"license_info,omitempty"`
|
|
||||||
UserStatus UserStatus `json:"user_status"`
|
|
||||||
PurchaseCount int `json:"purchase_count"`
|
|
||||||
BadgeFlag bool `json:"badge_flag"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type SubscriptionList struct {
|
|
||||||
ProductID string `json:"product_id"`
|
|
||||||
Name string `json:"name"`
|
|
||||||
BannerImgAsset string `json:"banner_img_asset"`
|
|
||||||
Price int `json:"price"`
|
|
||||||
CanBuy bool `json:"can_buy"`
|
|
||||||
ProductType int `json:"product_type"`
|
|
||||||
ProductURL string `json:"product_url"`
|
|
||||||
ItemList []SubscriptionItemList `json:"item_list"`
|
|
||||||
LimitStatus LimitStatus `json:"limit_status"`
|
|
||||||
SubscriptionStatus SubscriptionStatus `json:"subscription_status"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type ProductListResult struct {
|
|
||||||
RestrictionInfo RestrictionInfo `json:"restriction_info"`
|
|
||||||
UnderAgeInfo UnderAgeInfo `json:"under_age_info"`
|
|
||||||
SnsProductList []SnsProductList `json:"sns_product_list"`
|
|
||||||
ProductList []ProductList `json:"product_list"`
|
|
||||||
SubscriptionList []SubscriptionList `json:"subscription_list"`
|
|
||||||
ShowPointShop bool `json:"show_point_shop"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// module: banner, action: bannerList
|
|
||||||
type BannerList struct {
|
|
||||||
BannerType int `json:"banner_type"`
|
|
||||||
TargetID int `json:"target_id"`
|
|
||||||
AssetPath string `json:"asset_path"`
|
|
||||||
FixedFlag bool `json:"fixed_flag"`
|
|
||||||
BackSide bool `json:"back_side"`
|
|
||||||
BannerID int `json:"banner_id"`
|
|
||||||
StartDate string `json:"start_date"`
|
|
||||||
EndDate string `json:"end_date"`
|
|
||||||
AddUnitStartDate string `json:"add_unit_start_date,omitempty"`
|
|
||||||
WebviewURL string `json:"webview_url,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type BannerListResult struct {
|
|
||||||
TimeLimit string `json:"time_limit"`
|
|
||||||
BannerList []BannerList `json:"banner_list"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// module: notice, action: noticeMarquee
|
|
||||||
type NoticeMarqueeResult struct {
|
|
||||||
ItemCount int `json:"item_count"`
|
|
||||||
MarqueeList []interface{} `json:"marquee_list"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// module: user, action: getNavi
|
|
||||||
type User struct {
|
|
||||||
UserID int `json:"user_id"`
|
|
||||||
UnitOwningUserID int64 `json:"unit_owning_user_id"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type UserNaviResult struct {
|
|
||||||
User User `json:"user"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// module: navigation, action: specialCutin
|
|
||||||
type SpecialCutinResult struct {
|
|
||||||
SpecialCutinList []interface{} `json:"special_cutin_list"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// module: award, action: awardInfo
|
|
||||||
type AwardInfo struct {
|
|
||||||
AwardID int `json:"award_id"`
|
|
||||||
IsSet bool `json:"is_set"`
|
|
||||||
InsertDate string `json:"insert_date"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type AwardInfoResult struct {
|
|
||||||
AwardInfo []AwardInfo `json:"award_info"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// module: background, action: backgroundInfo
|
|
||||||
type BackgroundInfo struct {
|
|
||||||
BackgroundID int `json:"background_id"`
|
|
||||||
IsSet bool `json:"is_set"`
|
|
||||||
InsertDate string `json:"insert_date"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type BackgroundInfoResult struct {
|
|
||||||
BackgroundInfo []BackgroundInfo `json:"background_info"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// module: stamp, action: stampInfo
|
|
||||||
type StampList struct {
|
|
||||||
Position int `json:"position"`
|
|
||||||
StampID int `json:"stamp_id"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type SettingList struct {
|
|
||||||
StampSettingID int `json:"stamp_setting_id"`
|
|
||||||
MainFlag int `json:"main_flag"`
|
|
||||||
StampList []StampList `json:"stamp_list"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type StampSetting struct {
|
|
||||||
StampType int `json:"stamp_type"`
|
|
||||||
SettingList []SettingList `json:"setting_list"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type StampInfoResult struct {
|
|
||||||
OwningStampIds []int `json:"owning_stamp_ids"`
|
|
||||||
StampSetting []StampSetting `json:"stamp_setting"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// module: exchange, action: owningPoint
|
|
||||||
type ExchangePointList struct {
|
|
||||||
Rarity int `json:"rarity"`
|
|
||||||
ExchangePoint int `json:"exchange_point"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type OwningPointResult struct {
|
|
||||||
ExchangePointList []ExchangePointList `json:"exchange_point_list"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// module: livese, action: liveseInfo
|
|
||||||
type LiveSeInfoResult struct {
|
|
||||||
LiveSeList []int `json:"live_se_list"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// module: liveicon, action: liveiconInfo
|
|
||||||
type LiveIconInfoResult struct {
|
|
||||||
LiveNotesIconList []int `json:"live_notes_icon_list"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// module: item, action: list
|
|
||||||
|
|
||||||
// module: marathon, action: marathonInfo
|
|
||||||
|
|
||||||
// module: challenge, action: challengeInfo
|
|
||||||
|
|
||||||
// response_data
|
|
||||||
type Response struct {
|
|
||||||
ResponseData json.RawMessage `json:"response_data"`
|
|
||||||
ReleaseInfo []interface{} `json:"release_info"`
|
|
||||||
StatusCode int `json:"status_code"`
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,90 @@
|
|||||||
|
package model
|
||||||
|
|
||||||
|
// module: live, action: liveStatus
|
||||||
|
type NormalLiveStatusList struct {
|
||||||
|
LiveDifficultyID int `json:"live_difficulty_id"`
|
||||||
|
Status int `json:"status"`
|
||||||
|
HiScore int `json:"hi_score"`
|
||||||
|
HiComboCount int `json:"hi_combo_count"`
|
||||||
|
ClearCnt int `json:"clear_cnt"`
|
||||||
|
AchievedGoalIDList []int `json:"achieved_goal_id_list"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type SpecialLiveStatusList struct {
|
||||||
|
LiveDifficultyID int `json:"live_difficulty_id"`
|
||||||
|
Status int `json:"status"`
|
||||||
|
HiScore int `json:"hi_score"`
|
||||||
|
HiComboCount int `json:"hi_combo_count"`
|
||||||
|
ClearCnt int `json:"clear_cnt"`
|
||||||
|
AchievedGoalIDList []int `json:"achieved_goal_id_list"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type TrainingLiveStatusList struct {
|
||||||
|
LiveDifficultyID int `json:"live_difficulty_id"`
|
||||||
|
Status int `json:"status"`
|
||||||
|
HiScore int `json:"hi_score"`
|
||||||
|
HiComboCount int `json:"hi_combo_count"`
|
||||||
|
ClearCnt int `json:"clear_cnt"`
|
||||||
|
AchievedGoalIDList []int `json:"achieved_goal_id_list"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type LiveStatusResult struct {
|
||||||
|
NormalLiveStatusList []NormalLiveStatusList `json:"normal_live_status_list"`
|
||||||
|
SpecialLiveStatusList []SpecialLiveStatusList `json:"special_live_status_list"`
|
||||||
|
TrainingLiveStatusList []TrainingLiveStatusList `json:"training_live_status_list"`
|
||||||
|
MarathonLiveStatusList []interface{} `json:"marathon_live_status_list"`
|
||||||
|
FreeLiveStatusList []interface{} `json:"free_live_status_list"`
|
||||||
|
CanResumeLive bool `json:"can_resume_live"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type LiveStatusResp struct {
|
||||||
|
Result LiveStatusResult `json:"result"`
|
||||||
|
Status int `json:"status"`
|
||||||
|
CommandNum bool `json:"commandNum"`
|
||||||
|
TimeStamp int64 `json:"timeStamp"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// module: live, action: schedule
|
||||||
|
type LiveList struct {
|
||||||
|
LiveDifficultyID int `json:"live_difficulty_id"`
|
||||||
|
StartDate string `json:"start_date"`
|
||||||
|
EndDate string `json:"end_date"`
|
||||||
|
IsRandom bool `json:"is_random"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type LimitedBonusCommonList struct {
|
||||||
|
LiveType int `json:"live_type"`
|
||||||
|
LimitedBonusType int `json:"limited_bonus_type"`
|
||||||
|
LimitedBonusValue int `json:"limited_bonus_value"`
|
||||||
|
StartDate string `json:"start_date"`
|
||||||
|
EndDate string `json:"end_date"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type RandomLiveList struct {
|
||||||
|
AttributeID int `json:"attribute_id"`
|
||||||
|
StartDate string `json:"start_date"`
|
||||||
|
EndDate string `json:"end_date"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type TrainingLiveList struct {
|
||||||
|
LiveDifficultyID int `json:"live_difficulty_id"`
|
||||||
|
StartDate string `json:"start_date"`
|
||||||
|
IsRandom bool `json:"is_random"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type LiveScheduleResult struct {
|
||||||
|
EventList []interface{} `json:"event_list"`
|
||||||
|
LiveList []LiveList `json:"live_list"`
|
||||||
|
LimitedBonusList []interface{} `json:"limited_bonus_list"`
|
||||||
|
LimitedBonusCommonList []LimitedBonusCommonList `json:"limited_bonus_common_list"`
|
||||||
|
RandomLiveList []RandomLiveList `json:"random_live_list"`
|
||||||
|
FreeLiveList []interface{} `json:"free_live_list"`
|
||||||
|
TrainingLiveList []TrainingLiveList `json:"training_live_list"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type LiveScheduleResp struct {
|
||||||
|
Result LiveScheduleResult `json:"result"`
|
||||||
|
Status int `json:"status"`
|
||||||
|
CommandNum bool `json:"commandNum"`
|
||||||
|
TimeStamp int64 `json:"timeStamp"`
|
||||||
|
}
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
package model
|
||||||
|
|
||||||
|
type TopInfoLicenseInfo struct {
|
||||||
|
LicenseList []interface{} `json:"license_list"`
|
||||||
|
LicensedInfo []interface{} `json:"licensed_info"`
|
||||||
|
ExpiredInfo []interface{} `json:"expired_info"`
|
||||||
|
BadgeFlag bool `json:"badge_flag"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type TopInfoResult struct {
|
||||||
|
FriendActionCnt int `json:"friend_action_cnt"`
|
||||||
|
FriendGreetCnt int `json:"friend_greet_cnt"`
|
||||||
|
FriendVarietyCnt int `json:"friend_variety_cnt"`
|
||||||
|
FriendNewCnt int `json:"friend_new_cnt"`
|
||||||
|
PresentCnt int `json:"present_cnt"`
|
||||||
|
SecretBoxBadgeFlag bool `json:"secret_box_badge_flag"`
|
||||||
|
ServerDatetime string `json:"server_datetime"`
|
||||||
|
ServerTimestamp int `json:"server_timestamp"`
|
||||||
|
NoticeFriendDatetime string `json:"notice_friend_datetime"`
|
||||||
|
NoticeMailDatetime string `json:"notice_mail_datetime"`
|
||||||
|
FriendsApprovalWaitCnt int `json:"friends_approval_wait_cnt"`
|
||||||
|
FriendsRequestCnt int `json:"friends_request_cnt"`
|
||||||
|
IsTodayBirthday bool `json:"is_today_birthday"`
|
||||||
|
LicenseInfo TopInfoLicenseInfo `json:"license_info"`
|
||||||
|
UsingBuffInfo []interface{} `json:"using_buff_info"`
|
||||||
|
IsKlabIDTaskFlag bool `json:"is_klab_id_task_flag"`
|
||||||
|
KlabIDTaskCanSync bool `json:"klab_id_task_can_sync"`
|
||||||
|
HasUnreadAnnounce bool `json:"has_unread_announce"`
|
||||||
|
ExchangeBadgeCnt []int `json:"exchange_badge_cnt"`
|
||||||
|
AdFlag bool `json:"ad_flag"`
|
||||||
|
HasAdReward bool `json:"has_ad_reward"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type TopInfoOnceNotification struct {
|
||||||
|
Push bool `json:"push"`
|
||||||
|
Lp bool `json:"lp"`
|
||||||
|
UpdateInfo bool `json:"update_info"`
|
||||||
|
Campaign bool `json:"campaign"`
|
||||||
|
Live bool `json:"live"`
|
||||||
|
Lbonus bool `json:"lbonus"`
|
||||||
|
Event bool `json:"event"`
|
||||||
|
Secretbox bool `json:"secretbox"`
|
||||||
|
Birthday bool `json:"birthday"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type TopInfoOnceResult struct {
|
||||||
|
NewAchievementCnt int `json:"new_achievement_cnt"`
|
||||||
|
UnaccomplishedAchievementCnt int `json:"unaccomplished_achievement_cnt"`
|
||||||
|
LiveDailyRewardExist bool `json:"live_daily_reward_exist"`
|
||||||
|
TrainingEnergy int `json:"training_energy"`
|
||||||
|
TrainingEnergyMax int `json:"training_energy_max"`
|
||||||
|
Notification TopInfoOnceNotification `json:"notification"`
|
||||||
|
OpenArena bool `json:"open_arena"`
|
||||||
|
CostumeStatus bool `json:"costume_status"`
|
||||||
|
OpenAccessory bool `json:"open_accessory"`
|
||||||
|
ArenaSiSkillUniqueCheck bool `json:"arena_si_skill_unique_check"`
|
||||||
|
OpenV98 bool `json:"open_v98"`
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package model
|
||||||
|
|
||||||
|
// module: multiunit, action: multiunitscenarioStatus
|
||||||
|
type MultiUnitScenarioChapterList struct {
|
||||||
|
MultiUnitScenarioID int `json:"multi_unit_scenario_id"`
|
||||||
|
Chapter int `json:"chapter"`
|
||||||
|
Status int `json:"status"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type MultiUnitScenarioStatusList struct {
|
||||||
|
MultiUnitID int `json:"multi_unit_id"`
|
||||||
|
Status int `json:"status"`
|
||||||
|
MultiUnitScenarioBtnAsset string `json:"multi_unit_scenario_btn_asset"`
|
||||||
|
OpenDate string `json:"open_date"`
|
||||||
|
ChapterList []MultiUnitScenarioChapterList `json:"chapter_list"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type MultiUnitScenarioStatusResult struct {
|
||||||
|
MultiUnitScenarioStatusList []MultiUnitScenarioStatusList `json:"multi_unit_scenario_status_list"`
|
||||||
|
UnlockedMultiUnitScenarioIds []interface{} `json:"unlocked_multi_unit_scenario_ids"`
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package model
|
||||||
|
|
||||||
|
type MuseumInfoParameter struct {
|
||||||
|
Smile int `json:"smile"`
|
||||||
|
Pure int `json:"pure"`
|
||||||
|
Cool int `json:"cool"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type MuseumInfo struct {
|
||||||
|
Parameter MuseumInfoParameter `json:"parameter"`
|
||||||
|
ContentsIDList []interface{} `json:"contents_id_list"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type MuseumInfoResult struct {
|
||||||
|
MuseumInfo MuseumInfo `json:"museum_info"`
|
||||||
|
}
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
package model
|
||||||
|
|
||||||
|
// module: notice, action: noticeMarquee
|
||||||
|
type NoticeMarqueeResult struct {
|
||||||
|
ItemCount int `json:"item_count"`
|
||||||
|
MarqueeList []interface{} `json:"marquee_list"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// module: user, action: getNavi
|
||||||
|
type User struct {
|
||||||
|
UserID int `json:"user_id"`
|
||||||
|
UnitOwningUserID int64 `json:"unit_owning_user_id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type UserNaviResult struct {
|
||||||
|
User User `json:"user"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// module: navigation, action: specialCutin
|
||||||
|
type SpecialCutinResult struct {
|
||||||
|
SpecialCutinList []interface{} `json:"special_cutin_list"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// module: award, action: awardInfo
|
||||||
|
type AwardInfo struct {
|
||||||
|
AwardID int `json:"award_id"`
|
||||||
|
IsSet bool `json:"is_set"`
|
||||||
|
InsertDate string `json:"insert_date"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type AwardInfoResult struct {
|
||||||
|
AwardInfo []AwardInfo `json:"award_info"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// module: background, action: backgroundInfo
|
||||||
|
type BackgroundInfo struct {
|
||||||
|
BackgroundID int `json:"background_id"`
|
||||||
|
IsSet bool `json:"is_set"`
|
||||||
|
InsertDate string `json:"insert_date"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type BackgroundInfoResult struct {
|
||||||
|
BackgroundInfo []BackgroundInfo `json:"background_info"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// module: exchange, action: owningPoint
|
||||||
|
type ExchangePointList struct {
|
||||||
|
Rarity int `json:"rarity"`
|
||||||
|
ExchangePoint int `json:"exchange_point"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type OwningPointResult struct {
|
||||||
|
ExchangePointList []ExchangePointList `json:"exchange_point_list"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// module: livese, action: liveseInfo
|
||||||
|
type LiveSeInfoResult struct {
|
||||||
|
LiveSeList []int `json:"live_se_list"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// module: liveicon, action: liveiconInfo
|
||||||
|
type LiveIconInfoResult struct {
|
||||||
|
LiveNotesIconList []int `json:"live_notes_icon_list"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// module: item, action: list
|
||||||
|
|
||||||
|
// module: marathon, action: marathonInfo
|
||||||
|
|
||||||
|
// module: challenge, action: challengeInfo
|
||||||
@@ -0,0 +1,114 @@
|
|||||||
|
package model
|
||||||
|
|
||||||
|
// module: payment, action: productList
|
||||||
|
type RestrictionInfo struct {
|
||||||
|
Restricted bool `json:"restricted"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type UnderAgeInfo struct {
|
||||||
|
BirthSet bool `json:"birth_set"`
|
||||||
|
HasLimit bool `json:"has_limit"`
|
||||||
|
LimitAmount interface{} `json:"limit_amount"`
|
||||||
|
MonthUsed int `json:"month_used"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type SnsProductItemList struct {
|
||||||
|
ItemID int `json:"item_id"`
|
||||||
|
AddType int `json:"add_type"`
|
||||||
|
Amount int `json:"amount"`
|
||||||
|
IsFreebie bool `json:"is_freebie"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type SnsProductList struct {
|
||||||
|
ProductID string `json:"product_id"`
|
||||||
|
Name string `json:"name"`
|
||||||
|
Price int `json:"price"`
|
||||||
|
CanBuy bool `json:"can_buy"`
|
||||||
|
ProductType int `json:"product_type"`
|
||||||
|
ItemList []SnsProductItemList `json:"item_list"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type ProductItemList struct {
|
||||||
|
ItemID int `json:"item_id"`
|
||||||
|
AddType int `json:"add_type"`
|
||||||
|
Amount int `json:"amount"`
|
||||||
|
IsFreebie bool `json:"is_freebie"`
|
||||||
|
IsRankMax bool `json:"is_rank_max,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type LimitStatus struct {
|
||||||
|
TermStartDate string `json:"term_start_date"`
|
||||||
|
RemainingTime string `json:"remaining_time"`
|
||||||
|
RemainingCount int `json:"remaining_count"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type ProductList struct {
|
||||||
|
ProductID string `json:"product_id"`
|
||||||
|
Name string `json:"name"`
|
||||||
|
BannerImgAsset string `json:"banner_img_asset"`
|
||||||
|
Price int `json:"price"`
|
||||||
|
CanBuy bool `json:"can_buy"`
|
||||||
|
ProductType int `json:"product_type"`
|
||||||
|
AnnounceURL string `json:"announce_url"`
|
||||||
|
ConfirmURL string `json:"confirm_url"`
|
||||||
|
ItemList []ProductItemList `json:"item_list"`
|
||||||
|
LimitStatus LimitStatus `json:"limit_status"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type SubscriptionItemList struct {
|
||||||
|
ItemID int `json:"item_id"`
|
||||||
|
AddType int `json:"add_type"`
|
||||||
|
Amount int `json:"amount"`
|
||||||
|
IsFreebie bool `json:"is_freebie"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type RewardList struct {
|
||||||
|
ItemID int `json:"item_id"`
|
||||||
|
AddType int `json:"add_type"`
|
||||||
|
Amount int `json:"amount"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type Items struct {
|
||||||
|
Seq int `json:"seq"`
|
||||||
|
RewardList []RewardList `json:"reward_list"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type LicenseInfo struct {
|
||||||
|
Name string `json:"name"`
|
||||||
|
Items []Items `json:"items"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type UserStatus struct {
|
||||||
|
IsLicensed bool `json:"is_licensed"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type SubscriptionStatus struct {
|
||||||
|
LicenseID int `json:"license_id"`
|
||||||
|
LicenseType int `json:"license_type"`
|
||||||
|
LicenseInfo LicenseInfo `json:"license_info,omitempty"`
|
||||||
|
UserStatus UserStatus `json:"user_status"`
|
||||||
|
PurchaseCount int `json:"purchase_count"`
|
||||||
|
BadgeFlag bool `json:"badge_flag"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type SubscriptionList struct {
|
||||||
|
ProductID string `json:"product_id"`
|
||||||
|
Name string `json:"name"`
|
||||||
|
BannerImgAsset string `json:"banner_img_asset"`
|
||||||
|
Price int `json:"price"`
|
||||||
|
CanBuy bool `json:"can_buy"`
|
||||||
|
ProductType int `json:"product_type"`
|
||||||
|
ProductURL string `json:"product_url"`
|
||||||
|
ItemList []SubscriptionItemList `json:"item_list"`
|
||||||
|
LimitStatus LimitStatus `json:"limit_status"`
|
||||||
|
SubscriptionStatus SubscriptionStatus `json:"subscription_status"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type ProductListResult struct {
|
||||||
|
RestrictionInfo RestrictionInfo `json:"restriction_info"`
|
||||||
|
UnderAgeInfo UnderAgeInfo `json:"under_age_info"`
|
||||||
|
SnsProductList []SnsProductList `json:"sns_product_list"`
|
||||||
|
ProductList []ProductList `json:"product_list"`
|
||||||
|
SubscriptionList []SubscriptionList `json:"subscription_list"`
|
||||||
|
ShowPointShop bool `json:"show_point_shop"`
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package model
|
||||||
|
|
||||||
|
import "encoding/json"
|
||||||
|
|
||||||
|
// response_data
|
||||||
|
type Response struct {
|
||||||
|
ResponseData json.RawMessage `json:"response_data"`
|
||||||
|
ReleaseInfo []interface{} `json:"release_info"`
|
||||||
|
StatusCode int `json:"status_code"`
|
||||||
|
}
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
package model
|
||||||
|
|
||||||
|
// module: scenario, action: scenarioStatus
|
||||||
|
type ScenarioStatusList struct {
|
||||||
|
ScenarioID int `json:"scenario_id"`
|
||||||
|
Status int `json:"status"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type ScenarioStatusResult struct {
|
||||||
|
ScenarioStatusList []ScenarioStatusList `json:"scenario_status_list"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// module: subscenario, action: subscenarioStatus
|
||||||
|
type SubscenarioStatusList struct {
|
||||||
|
SubscenarioID int `json:"subscenario_id"`
|
||||||
|
Status int `json:"status"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type SubscenarioStatusResult struct {
|
||||||
|
SubscenarioStatusList []SubscenarioStatusList `json:"subscenario_status_list"`
|
||||||
|
UnlockedSubscenarioIds []interface{} `json:"unlocked_subscenario_ids"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// module: eventscenario, action: status
|
||||||
|
type EventScenarioChapterList struct {
|
||||||
|
EventScenarioID int `json:"event_scenario_id"`
|
||||||
|
Chapter int `json:"chapter"`
|
||||||
|
ChapterAsset string `json:"chapter_asset"`
|
||||||
|
Status int `json:"status"`
|
||||||
|
OpenFlashFlag int `json:"open_flash_flag"`
|
||||||
|
IsReward bool `json:"is_reward"`
|
||||||
|
CostType int `json:"cost_type"`
|
||||||
|
ItemID int `json:"item_id"`
|
||||||
|
Amount int `json:"amount"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type EventScenarioList struct {
|
||||||
|
EventID int `json:"event_id"`
|
||||||
|
EventScenarioBtnAsset string `json:"event_scenario_btn_asset"`
|
||||||
|
OpenDate string `json:"open_date"`
|
||||||
|
ChapterList []EventScenarioChapterList `json:"chapter_list"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type EventScenarioStatusResult struct {
|
||||||
|
EventScenarioList []EventScenarioList `json:"event_scenario_list"`
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package model
|
||||||
|
|
||||||
|
// module: stamp, action: stampInfo
|
||||||
|
type StampList struct {
|
||||||
|
Position int `json:"position"`
|
||||||
|
StampID int `json:"stamp_id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type SettingList struct {
|
||||||
|
StampSettingID int `json:"stamp_setting_id"`
|
||||||
|
MainFlag int `json:"main_flag"`
|
||||||
|
StampList []StampList `json:"stamp_list"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type StampSetting struct {
|
||||||
|
StampType int `json:"stamp_type"`
|
||||||
|
SettingList []SettingList `json:"setting_list"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type StampInfoResult struct {
|
||||||
|
OwningStampIds []int `json:"owning_stamp_ids"`
|
||||||
|
StampSetting []StampSetting `json:"stamp_setting"`
|
||||||
|
}
|
||||||
+110
@@ -0,0 +1,110 @@
|
|||||||
|
package model
|
||||||
|
|
||||||
|
type UnitAccessoryAllResult struct {
|
||||||
|
AccessoryList []interface{} `json:"accessory_list"`
|
||||||
|
WearingInfo []interface{} `json:"wearing_info"`
|
||||||
|
EspecialCreateFlag bool `json:"especial_create_flag"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// module: unit, action: unitAll
|
||||||
|
type Costume struct {
|
||||||
|
UnitID int `json:"unit_id"`
|
||||||
|
IsRankMax bool `json:"is_rank_max"`
|
||||||
|
IsSigned bool `json:"is_signed"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type Active struct {
|
||||||
|
UnitOwningUserID int `json:"unit_owning_user_id"`
|
||||||
|
UnitID int `json:"unit_id"`
|
||||||
|
Exp int `json:"exp"`
|
||||||
|
NextExp int `json:"next_exp"`
|
||||||
|
Level int `json:"level"`
|
||||||
|
MaxLevel int `json:"max_level"`
|
||||||
|
LevelLimitID int `json:"level_limit_id"`
|
||||||
|
Rank int `json:"rank"`
|
||||||
|
MaxRank int `json:"max_rank"`
|
||||||
|
Love int `json:"love"`
|
||||||
|
MaxLove int `json:"max_love"`
|
||||||
|
UnitSkillExp int `json:"unit_skill_exp"`
|
||||||
|
UnitSkillLevel int `json:"unit_skill_level"`
|
||||||
|
MaxHp int `json:"max_hp"`
|
||||||
|
UnitRemovableSkillCapacity int `json:"unit_removable_skill_capacity"`
|
||||||
|
FavoriteFlag bool `json:"favorite_flag"`
|
||||||
|
DisplayRank int `json:"display_rank"`
|
||||||
|
IsRankMax bool `json:"is_rank_max"`
|
||||||
|
IsLoveMax bool `json:"is_love_max"`
|
||||||
|
IsLevelMax bool `json:"is_level_max"`
|
||||||
|
IsSigned bool `json:"is_signed"`
|
||||||
|
IsSkillLevelMax bool `json:"is_skill_level_max"`
|
||||||
|
IsRemovableSkillCapacityMax bool `json:"is_removable_skill_capacity_max"`
|
||||||
|
InsertDate string `json:"insert_date"`
|
||||||
|
// Costume Costume `json:"costume,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type Waiting struct {
|
||||||
|
UnitOwningUserID int64 `json:"unit_owning_user_id"`
|
||||||
|
UnitID int `json:"unit_id"`
|
||||||
|
Exp int `json:"exp"`
|
||||||
|
NextExp int `json:"next_exp"`
|
||||||
|
Level int `json:"level"`
|
||||||
|
MaxLevel int `json:"max_level"`
|
||||||
|
LevelLimitID int `json:"level_limit_id"`
|
||||||
|
Rank int `json:"rank"`
|
||||||
|
MaxRank int `json:"max_rank"`
|
||||||
|
Love int `json:"love"`
|
||||||
|
MaxLove int `json:"max_love"`
|
||||||
|
UnitSkillExp int `json:"unit_skill_exp"`
|
||||||
|
UnitSkillLevel int `json:"unit_skill_level"`
|
||||||
|
MaxHp int `json:"max_hp"`
|
||||||
|
UnitRemovableSkillCapacity int `json:"unit_removable_skill_capacity"`
|
||||||
|
FavoriteFlag bool `json:"favorite_flag"`
|
||||||
|
DisplayRank int `json:"display_rank"`
|
||||||
|
IsRankMax bool `json:"is_rank_max"`
|
||||||
|
IsLoveMax bool `json:"is_love_max"`
|
||||||
|
IsLevelMax bool `json:"is_level_max"`
|
||||||
|
IsSigned bool `json:"is_signed"`
|
||||||
|
IsSkillLevelMax bool `json:"is_skill_level_max"`
|
||||||
|
IsRemovableSkillCapacityMax bool `json:"is_removable_skill_capacity_max"`
|
||||||
|
InsertDate string `json:"insert_date"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type UnitAllResult struct {
|
||||||
|
Active []Active `json:"active"`
|
||||||
|
Waiting []Waiting `json:"waiting"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type UnitAllResp struct {
|
||||||
|
Result UnitAllResult `json:"result"`
|
||||||
|
Status int `json:"status"`
|
||||||
|
CommandNum bool `json:"commandNum"`
|
||||||
|
TimeStamp int64 `json:"timeStamp"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// module: unit, action: deckInfo
|
||||||
|
type UnitOwningUserIds struct {
|
||||||
|
Position int `json:"position"`
|
||||||
|
UnitOwningUserID int64 `json:"unit_owning_user_id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type UnitDeckInfo struct {
|
||||||
|
UnitDeckID int `json:"unit_deck_id"`
|
||||||
|
MainFlag bool `json:"main_flag"`
|
||||||
|
DeckName string `json:"deck_name"`
|
||||||
|
UnitOwningUserIds []UnitOwningUserIds `json:"unit_owning_user_ids"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type UnitDeckInfoResult struct {
|
||||||
|
UnitDeckInfo []UnitDeckInfo
|
||||||
|
}
|
||||||
|
|
||||||
|
// module: unit, action: supporterAll
|
||||||
|
type UnitSupportList struct {
|
||||||
|
UnitID int `json:"unit_id"`
|
||||||
|
Amount int `json:"amount"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type UnitSupporterAllResult struct {
|
||||||
|
UnitSupportList []UnitSupportList `json:"unit_support_list"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// module: unit, action: removableSkillInfo
|
||||||
+1
-14
File diff suppressed because one or more lines are too long
+1
-1
@@ -614,7 +614,7 @@ func Start() {
|
|||||||
fmt.Printf(" overlap packets:\t%d\n", stats.overlapPackets)
|
fmt.Printf(" overlap packets:\t%d\n", stats.overlapPackets)
|
||||||
fmt.Printf(" overlap bytes:\t\t%d\n", stats.overlapBytes)
|
fmt.Printf(" overlap bytes:\t\t%d\n", stats.overlapBytes)
|
||||||
fmt.Printf("Errors: %d\n", errors)
|
fmt.Printf("Errors: %d\n", errors)
|
||||||
for e, _ := range errorsMap {
|
for e := range errorsMap {
|
||||||
fmt.Printf(" %s:\t\t%d\n", e, errorsMap[e])
|
fmt.Printf(" %s:\t\t%d\n", e, errorsMap[e])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+140
@@ -0,0 +1,140 @@
|
|||||||
|
package tools
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
"honoka-chan/database"
|
||||||
|
"honoka-chan/model"
|
||||||
|
"honoka-chan/utils"
|
||||||
|
)
|
||||||
|
|
||||||
|
func AnalysisApi1Data(path string) {
|
||||||
|
apiData := utils.ReadAllText(path)
|
||||||
|
if apiData != "" {
|
||||||
|
var obj model.Response
|
||||||
|
err := json.Unmarshal([]byte(apiData), &obj)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
var data interface{}
|
||||||
|
err = json.Unmarshal(obj.ResponseData, &data)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
// resultType := reflect.TypeOf(data)
|
||||||
|
// if resultType.Kind() == reflect.Map {
|
||||||
|
// data = data.(map[string]interface{})
|
||||||
|
// }
|
||||||
|
result := data.([]interface{})
|
||||||
|
for k, v := range result {
|
||||||
|
m, err := json.Marshal(v)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
key := ""
|
||||||
|
switch k {
|
||||||
|
case 0:
|
||||||
|
key = "live_status_result"
|
||||||
|
case 1:
|
||||||
|
key = "live_list_result"
|
||||||
|
case 2:
|
||||||
|
key = "unit_list_result"
|
||||||
|
case 3:
|
||||||
|
key = "unit_deck_result"
|
||||||
|
case 4:
|
||||||
|
key = "unit_support_result"
|
||||||
|
case 5:
|
||||||
|
key = "owning_equip_result"
|
||||||
|
case 6:
|
||||||
|
key = "costume_list_result"
|
||||||
|
case 7:
|
||||||
|
key = "album_unit_result"
|
||||||
|
case 8:
|
||||||
|
key = "scenario_status_result"
|
||||||
|
case 9:
|
||||||
|
key = "subscenario_status_result"
|
||||||
|
case 10:
|
||||||
|
key = "event_scenario_result"
|
||||||
|
case 11:
|
||||||
|
key = "multi_unit_scenario_result"
|
||||||
|
case 12:
|
||||||
|
key = "product_result"
|
||||||
|
case 13:
|
||||||
|
key = "banner_result"
|
||||||
|
case 14:
|
||||||
|
key = "item_marquee_result"
|
||||||
|
case 15:
|
||||||
|
key = "user_intro_result"
|
||||||
|
case 16:
|
||||||
|
key = "special_cutin_result"
|
||||||
|
case 17:
|
||||||
|
key = "award_result"
|
||||||
|
case 18:
|
||||||
|
key = "background_result"
|
||||||
|
case 19:
|
||||||
|
key = "stamp_result"
|
||||||
|
case 20:
|
||||||
|
key = "exchange_point_result"
|
||||||
|
case 21:
|
||||||
|
key = "live_se_result"
|
||||||
|
case 22:
|
||||||
|
key = "live_icon_result"
|
||||||
|
case 23:
|
||||||
|
key = "item_list_result"
|
||||||
|
case 24:
|
||||||
|
key = "marathon_result"
|
||||||
|
case 25:
|
||||||
|
key = "challenge_result"
|
||||||
|
}
|
||||||
|
|
||||||
|
if key != "" {
|
||||||
|
database.RedisCli.HSet(database.RedisCtx, "temp_dataset", key, string(m))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func AnalysisApi2Data(path string) {
|
||||||
|
apiData := utils.ReadAllText(path)
|
||||||
|
if apiData != "" {
|
||||||
|
var obj model.Response
|
||||||
|
err := json.Unmarshal([]byte(apiData), &obj)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
var data interface{}
|
||||||
|
err = json.Unmarshal(obj.ResponseData, &data)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
// resultType := reflect.TypeOf(data)
|
||||||
|
// if resultType.Kind() == reflect.Map {
|
||||||
|
// data = data.(map[string]interface{})
|
||||||
|
// }
|
||||||
|
result := data.([]interface{})
|
||||||
|
for k, v := range result {
|
||||||
|
m, err := json.Marshal(v)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
key := ""
|
||||||
|
switch k {
|
||||||
|
case 0:
|
||||||
|
key = "login_topinfo_result"
|
||||||
|
case 1:
|
||||||
|
key = "login_topinfo_once_result"
|
||||||
|
case 2:
|
||||||
|
key = "unit_accessory_result"
|
||||||
|
case 3:
|
||||||
|
key = "museum_result"
|
||||||
|
}
|
||||||
|
|
||||||
|
if key != "" {
|
||||||
|
database.RedisCli.HSet(database.RedisCtx, "temp_dataset", key, string(m))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user