87 lines
3.0 KiB
C#
87 lines
3.0 KiB
C#
using Assets.MyGame.Scripts.Net.API;
|
||
using Assets.MyGame.Scripts.Net.APIRequest;
|
||
using Assets.MyGame.Scripts.Net.APIRequest.Objs;
|
||
using Assets.MyGame.Scripts.Net.APIRequest.Params;
|
||
using Assets.MyGame.Scripts.Net.APIResponses.HomeMain_User;
|
||
using Newtonsoft.Json.Linq;
|
||
using System;
|
||
using System.Collections.Generic;
|
||
|
||
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<List<GetEmailByPageResponse>> callback)
|
||
{
|
||
APIManager.Response<List<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<JObject> callback)
|
||
{
|
||
APIManager.Response<JObject>(APIType.User_RewardEmail, req, callback);
|
||
}
|
||
|
||
/// <summary>
|
||
/// 删除已读邮件(GET)
|
||
/// 参数:邮件 id (Param)
|
||
/// 返回:string(结果提示)
|
||
/// </summary>
|
||
public static void DeleteEmail(DeleteEmailParam req, Action<JObject> callback)
|
||
{
|
||
APIManager.Response<JObject>(APIType.User_DeleteEmail, req, callback);
|
||
}
|
||
|
||
/// <summary>
|
||
/// 一键阅读所有未读邮件(GET,无参)
|
||
/// 返回:string(结果提示)
|
||
/// </summary>
|
||
public static void ReadEmailMore(Action<JObject> callback)
|
||
{
|
||
APIManager.Response<JObject>(APIType.User_ReadEmailMore, callback);
|
||
}
|
||
|
||
/// <summary>
|
||
/// 获取未读邮件数量(GET,无参)
|
||
/// 返回:long(未读数量)
|
||
/// </summary>
|
||
public static void GetNoReadCount(Action<long> callback)
|
||
{
|
||
APIManager.Response<long>(APIType.User_GetNoReadCount, callback);
|
||
}
|
||
/// <summary>
|
||
/// 获取未读邮件数量(GET,无参)
|
||
/// 返回:long(未读数量)
|
||
/// </summary>
|
||
public static void GetUser(string userID,Action<UserData> callback)
|
||
{
|
||
APIManager.Response<UserData>(APIType.User_GetUser,new GetUserParam
|
||
{
|
||
userid=userID
|
||
}, callback);
|
||
}
|
||
#endregion
|
||
}
|
||
}
|