Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Commit

Permalink
Add TOT
Browse files Browse the repository at this point in the history
  • Loading branch information
kokoropie committed Sep 9, 2023
1 parent 4799e70 commit f230012
Show file tree
Hide file tree
Showing 5 changed files with 412 additions and 117 deletions.
74 changes: 60 additions & 14 deletions CheckinHoyoverse/ConfigJson.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Text.Json.Serialization;
using System;
using System.Text.Json.Serialization;

namespace CheckinHoyoverse
{
Expand All @@ -7,6 +8,9 @@ public class ConfigJson
[JsonPropertyName("data")]
public List<Data> data { get; set; }

[JsonPropertyName("version")]
public string version { get; set; }

[JsonPropertyName("url")]
public Url url { get; set; }

Expand All @@ -24,8 +28,19 @@ public class ConfigJson

public ConfigJson() {
data = new List<Data>();
version = string.Empty;
url = new Url();
userAgent = new List<string>();
userAgent.Add("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36");
userAgent.Add("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36");
userAgent.Add("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Firefox/89.0.2");
userAgent.Add("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Firefox/91.0");
userAgent.Add("Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0");
userAgent.Add("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.1 Safari/605.1.15");
userAgent.Add("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36 Edg/91.0.864.59");
userAgent.Add("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36 OPR/77.0.4054.277");
userAgent.Add("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36");
userAgent.Add("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36");
current_user_agent = 0;
lang = "en-us";
api_lang = "https://bbs-api-os.hoyolab.com/community/misc/wapi/langs";
Expand All @@ -49,18 +64,22 @@ public class Data
[JsonPropertyName("hsr")]
public bool hsr { get; set; }

[JsonPropertyName("tot")]
public bool tot { get; set; }

public Data()
{
name = string.Empty;
cookies = string.Empty;
gi = false;
hi3 = false;
hsr = false;
tot = false;
}

public override string ToString()
{
return $"{name} | {gi} | {hi3} | {hsr} | {cookies}";
return $"{name} | {gi} | {hi3} | {hsr} | {tot} | {cookies}";
}
}

Expand All @@ -75,11 +94,15 @@ public class Url
[JsonPropertyName("hsr")]
public Hsr hsr { get; set; }

[JsonPropertyName("tot")]
public Tot tot { get; set; }

public Url()
{
gi = new Gi();
hi3 = new Hi3();
hsr = new Hsr();
tot = new Tot();
}
}

Expand All @@ -99,10 +122,10 @@ public class Gi

public Gi()
{
info = string.Empty;
sign = string.Empty;
home = string.Empty;
act_id = string.Empty;
info = "https://sg-hk4e-api.hoyolab.com/event/sol/info";
sign = "https://sg-hk4e-api.hoyolab.com/event/sol/sign";
home = "https://sg-hk4e-api.hoyolab.com/event/sol/home";
act_id = "e202102251931481";
}
}

Expand All @@ -122,10 +145,10 @@ public class Hi3

public Hi3()
{
info = string.Empty;
sign = string.Empty;
home = string.Empty;
act_id = string.Empty;
info = "https://sg-public-api.hoyolab.com/event/mani/info";
sign = "https://sg-public-api.hoyolab.com/event/mani/sign";
home = "https://sg-public-api.hoyolab.com/event/mani/home";
act_id = "e202110291205111";
}
}

Expand All @@ -145,10 +168,33 @@ public class Hsr

public Hsr()
{
info = string.Empty;
sign = string.Empty;
home = string.Empty;
act_id = string.Empty;
info = "https://sg-public-api.hoyolab.com/event/luna/os/info";
sign = "https://sg-public-api.hoyolab.com/event/luna/os/sign";
home = "https://sg-public-api.hoyolab.com/event/luna/os/home";
act_id = "e202303301540311";
}
}

public class Tot
{
[JsonPropertyName("info")]
public string info { get; set; }

[JsonPropertyName("sign")]
public string sign { get; set; }

[JsonPropertyName("home")]
public string home { get; set; }

[JsonPropertyName("act_id")]
public string act_id { get; set; }

public Tot()
{
info = "https://sg-public-api.hoyolab.com/event/luna/os/info";
sign = "https://sg-public-api.hoyolab.com/event/luna/os/sign";
home = "https://sg-public-api.hoyolab.com/event/luna/os/home";
act_id = "e202202281857121";
}
}
}
Loading

0 comments on commit f230012

Please sign in to comment.