using CloudGaming.DtoModel.JY;
using CloudGaming.DtoModel.PlayGame;

using HuanMeng.DotNetCore.Base;

using Newtonsoft.Json.Linq;

using Refit;

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CloudGaming.Code.Contract
{
    /// <summary>
    /// 
    /// </summary>
    public interface IJYApi
    {

        /// <summary>
        /// 获取token
        /// </summary>
        /// <param name="requestParameter"></param>
        /// <returns></returns>
        [Post("/jyapi/getToken")]
        Task<JYApiResponse<GetTokenModel>> GetToken([Body(BodySerializationMethod.UrlEncoded)] JYRequestParameter requestParameter);

        /// <summary>
        /// 启动游戏
        /// </summary>
        /// <param name="playGameSettings"></param>
        /// <returns></returns>
        [Post("/jyapi/playGame")]
        Task<JYApiResponse<Dictionary<string, object>>> PlayGame([Body(BodySerializationMethod.UrlEncoded)] PlayGameSettings playGameSettings);

        /// <summary>
        ///排队查询
        /// </summary>
        /// <param name="playGameQueue"></param>
        /// <returns></returns>
        [Post("/jyapi/playQueue")]
        Task<JYApiResponse<PlayQueueInfoModel>> PlayQueue([Body(BodySerializationMethod.UrlEncoded)] PlayGameQueue playGameQueue);

        /// <summary>
        /// 取消排队
        /// </summary>
        /// <param name="playGameQueue"></param>
        /// <returns></returns>
        [Post("/jyapi/cancelQueue")]
        Task<JYApiResponse<Dictionary<string, object>>> CancelQueue([Body(BodySerializationMethod.UrlEncoded)] PlayGameQueue playGameQueue);

        /// <summary>
        /// 切换视频等级
        /// </summary>
        /// <param name="playGameQueue"></param>
        /// <returns></returns>
        [Post("/jyapi/displayGrade")]
        Task<JYApiResponse<Dictionary<string, object>>> DisplayGrade([Body(BodySerializationMethod.UrlEncoded)] DisplayGradeSettings playGameQueue);

        /// <summary>
        /// 重连会话 
        /// </summary>
        /// <param name="playGameQueue"></param>
        /// <returns></returns>
        [Post("/jyapi/reconPlayGame")]
        Task<JYApiResponse<Dictionary<string, object>>> ReconPlayGame([Body(BodySerializationMethod.UrlEncoded)] ReconPlayGameSettings reconPlayGameSettings);

        /// <summary>
        /// 停止游戏
        /// </summary>
        /// <param name="playGameQueue"></param>
        /// <returns></returns>
        [Post("/jyapi/stopGame")]
        Task<JYApiResponse<Dictionary<string, object>>> StopGame([Body(BodySerializationMethod.UrlEncoded)] PlayGameCommonSetting playGameQueue);


        /// <summary>
        /// 查看自己的会话列表
        /// </summary>
        /// <param name="requestBase"></param>
        /// <returns></returns>
        [Post("/jyapi/myScList")]
        Task<JYApiResponse<MyScListModel>> MyScList([Body(BodySerializationMethod.UrlEncoded)] JYRequestParameter parameter);
        /// <summary>
        /// 获取会话列表
        /// </summary>
        /// <returns></returns>
        [Post("/jyapi/getSessionList")]
        Task<JYApiResponse<Dictionary<string, object>>> GetSessionList();


    }
}
