Files
5.24BuYu/Assets/MyGame/Scripts/Net/APIRequestList_User.cs
T

73 lines
2.5 KiB
C#
Raw Normal View History

2026-04-10 18:30:56 +08:00
using Assets.MyGame.Scripts.Net.APIRequest.Objs;
using Assets.MyGame.Scripts.Net.APIRequest.Params;
using Assets.MyGame.Scripts.Net.APIResponses.HomeMain_User;
using System;
namespace Assets.MyGame.Scripts.Net
{
public static partial class APIRequestList
{
#region User_Email
/// <summary>
/// 获取邮件列表(POST)
/// 参数:keyWord / pageIndex / pageSize / readStatus
/// 返回:GetEmailByPageResponse(邮件列表,分页)
/// </summary>
public static void GetEmailByPage(GetEmailByPageObj req, Action<GetEmailByPageResponse> callback)
{
APIManager.Response<GetEmailByPageResponse>(APIType.User_GetEmailByPage, req, callback);
}
/// <summary>
/// 获取邮件详情,未读自动变为已读(GET)
/// 参数:邮件 id (Param)
/// 返回:GetEmailByPageResponse(单封邮件)
/// </summary>
public static void GetEmail(GetEmailParam req, Action<GetEmailByPageResponse> callback)
{
APIManager.Response<GetEmailByPageResponse>(APIType.User_GetEmail, req, callback);
}
/// <summary>
/// 领取邮箱奖励(GET)
/// 参数:邮件 id (Param)
/// 返回:string(结果提示)
/// </summary>
public static void RewardEmail(RewardEmailParam req, Action<string> callback)
{
APIManager.Response<string>(APIType.User_RewardEmail, req, callback);
}
/// <summary>
/// 删除已读邮件(GET)
/// 参数:邮件 id (Param)
/// 返回:string(结果提示)
/// </summary>
public static void DeleteEmail(DeleteEmailParam req, Action<string> callback)
{
APIManager.Response<string>(APIType.User_DeleteEmail, req, callback);
}
/// <summary>
/// 一键阅读所有未读邮件(GET,无参)
/// 返回:string(结果提示)
/// </summary>
public static void ReadEmailMore(Action<string> callback)
{
APIManager.Response<string>(APIType.User_ReadEmailMore, callback);
}
/// <summary>
/// 获取未读邮件数量(GET,无参)
/// 返回:long(未读数量)
/// </summary>
public static void GetNoReadCount(Action<long> callback)
{
APIManager.Response<long>(APIType.User_GetNoReadCount, callback);
}
#endregion
}
}