44 lines
1.4 KiB
C#
44 lines
1.4 KiB
C#
using DingTalk.Api.Response;
|
||
using System.ServiceModel;
|
||
using System.ServiceModel.Web;
|
||
|
||
namespace ZXDService
|
||
{
|
||
// 注意: 使用“重构”菜单上的“重命名”命令,可以同时更改代码和配置文件中的接口名“IDingTalk”。
|
||
[ServiceContract]
|
||
public interface IDingTalkService
|
||
{
|
||
[OperationContract]
|
||
[WebInvoke(Method = "*",
|
||
RequestFormat = WebMessageFormat.Json,
|
||
ResponseFormat = WebMessageFormat.Json,
|
||
BodyStyle = WebMessageBodyStyle.Bare,
|
||
UriTemplate = "GetToken")]
|
||
OapiGettokenResponse GetToken();
|
||
|
||
[OperationContract]
|
||
[WebInvoke(Method = "*",
|
||
RequestFormat = WebMessageFormat.Json,
|
||
ResponseFormat = WebMessageFormat.Json,
|
||
BodyStyle = WebMessageBodyStyle.Bare,
|
||
UriTemplate = "GetUserInfo?access_token={access_token}&code={code}")]
|
||
OapiUserGetuserinfoResponse GetUserInfo(string access_token, string code);
|
||
}
|
||
|
||
//public class DingTalkToKen
|
||
//{
|
||
// public int errcode { get; set; }
|
||
// public string errmsg { get; set; }
|
||
// public string access_token { get; set; }
|
||
//}
|
||
|
||
//public class DingTalkUserInfo
|
||
//{
|
||
// public string userid { get; set; }
|
||
// public int sys_level { get; set; }
|
||
// public string errmsg { get; set; }
|
||
// public bool is_sys { get; set; }
|
||
// public int errcode { get; set; }
|
||
//}
|
||
}
|