using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace YBDevice.NApi.Application.ThirdClient { /// /// 基础请求参数 /// public class TouTiaoBaseRequest { /// /// 账户appid /// public string Appid { get; set; } = "tte74991f478708b7401"; /// /// 账户密钥 /// public string Secret { get; set; } = "de8c3a4813130eaf455b3fd84d13d8fa84e2a00e"; } /// /// code2session接口参数 /// public class TouTiaoCode2SessionRequest: TouTiaoBaseRequest { /// /// login 接口返回的登录凭证 /// public string code { get; set; } /// /// login 接口返回的匿名登录凭证 /// public string anonymous_code { get; set; } } /// /// 头条响应数据 /// public class TouTiaoResponseInfo { /// /// 错误代码,0-正确,其他均为异常 /// public int err_no { get; set; } /// /// 错误描述 /// public string err_tips { get; set; } } /// /// 头条响应数据 /// public class TouTiaoResponseData: TouTiaoResponseInfo { /// /// 数据体 /// public T data { get; set; } } /// /// 头条登录响应数据 /// public class TuTiaoLoginResponse { /// /// 会话密钥,如果请求时有 code 参数才会返回 /// public string session_key { get; set; } /// /// 用户在当前小程序的 ID,如果请求时有 code 参数才会返回 /// public string openid { get; set; } /// /// 匿名用户在当前小程序的 ID,如果请求时有 anonymous_code 参数才会返回 /// public string anonymous_openid { get; set; } /// /// 用户在小程序平台的唯一标识符,请求时有 code 参数才会返回。如果开发者拥有多个小程序,可通过 unionid 来区分用户的唯一性。 /// public string unionid { get; set; } } }