mirror of
https://git.oceanpay.cc/danial/kami_itunes_june.git
synced 2025-12-18 22:31:24 +00:00
- Removed DotRas library dependency in RasTools.cs, providing empty implementations for Connect and Disconnect methods. - Updated context menu implementation in ReddemHelp.cs to use ToolStripMenuItem and ContextMenuStrip. - Replaced caching mechanism in SiteHelper.cs with a custom dictionary-based implementation, removing reliance on HttpRuntime.Cache. - Switched from JavaScriptSerializer to Newtonsoft.Json for JSON serialization/deserialization in multiple files (Tools.cs, addMaterial.cs). - Added WebHeaderCollection property to HttpItem.cs for better header management. - Deleted obsolete AssemblyInfo.cs file. - Introduced apple_balance_query.py for querying Apple ID balance via Privacy Center, implementing authentication and balance retrieval logic.
35 lines
754 B
C#
35 lines
754 B
C#
using System.Collections.Generic;
|
|
using System.Net;
|
|
using Newtonsoft.Json;
|
|
using AppleBatch_June.Model;
|
|
using DotNet.Utilities;
|
|
|
|
namespace AppleBatch_June.Domain
|
|
{
|
|
public class NationalData
|
|
{
|
|
private static string nationJson = string.Empty;
|
|
|
|
public List<NationalList> getMation()
|
|
{
|
|
if (nationJson == string.Empty)
|
|
{
|
|
HttpResult html = new HttpHelper().GetHtml(new HttpItem
|
|
{
|
|
URL = "https://teluns-api.oss-cn-shenzhen.aliyuncs.com/nation.json",
|
|
Timeout = 8000
|
|
});
|
|
if (html.StatusCode == HttpStatusCode.OK)
|
|
{
|
|
nationJson = html.Html;
|
|
}
|
|
}
|
|
if (nationJson != string.Empty)
|
|
{
|
|
return JsonConvert.DeserializeObject<List<NationalList>>(nationJson);
|
|
}
|
|
return new List<NationalList>();
|
|
}
|
|
}
|
|
}
|