Documentation ¶
Index ¶
- type ResultWeixin
- type TAccessToken
- type TAdmin
- type TAdmins
- type TDepartmentInfo
- type TDingTalkClient
- func (Self *TDingTalkClient) GetAccessToken() (string, error)
- func (Self *TDingTalkClient) GetAdmins() (*TAdmins, error)
- func (Self *TDingTalkClient) GetDepartment(depid int) (*TDepartmentInfo, error)
- func (Self *TDingTalkClient) GetFullDepartmentName(depid int) (string, error)
- func (Self *TDingTalkClient) GetJobName(depids []int) (string, error)
- func (Self *TDingTalkClient) GetLoginInfo(authcode string) (*TLoginInfo, error)
- func (Self *TDingTalkClient) GetOrgName(depids []int) (string, error)
- func (Self *TDingTalkClient) GetUserInfo(userid string) (*TUserInfo, error)
- func (Self *TDingTalkClient) GetUserInfoByPhone(phone string) (*TUserInfo, error)
- func (Self *TDingTalkClient) SendWorkNotify(msg string) (int, error)
- type TLoginInfo
- type TResult
- type TUserInfo
- type TWorkNotify
- type WorkWeixin
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResultWeixin ¶
type TAccessToken ¶
type TAccessToken struct { TResult AccessToken string `json:"access_token"` ExpiresIn int `json:"expires_in"` CreateDate time.Time }
func (*TAccessToken) IsValid ¶
func (Self *TAccessToken) IsValid() bool
func (*TAccessToken) String ¶
func (Self *TAccessToken) String() string
type TDepartmentInfo ¶
type TDepartmentInfo struct { TResult Id int `json:"id"` PId int `json:"parentid"` Name string `json:"name"` MUserId string `json:"deptManagerUseridList"` //部门的主管列表,取值为由主管的userid组成的字符串,不同的userid使用“\|”符号进行分割 IsSub bool `json:"groupContainSubDept"` //部门群是否包含子部门 }
func (*TDepartmentInfo) String ¶
func (Self *TDepartmentInfo) String() string
type TDingTalkClient ¶
type TDingTalkClient struct {
// contains filtered or unexported fields
}
func GetDingTalkClient ¶
func GetDingTalkClient(appkey, appsecret string) *TDingTalkClient
func (*TDingTalkClient) GetAccessToken ¶
func (Self *TDingTalkClient) GetAccessToken() (string, error)
https://oapi.dingtalk.com/gettoken?appkey=key&appsecret=secret {"errorCode":503,"success":false,"errorMsg":"不合法的access_token"}
func (*TDingTalkClient) GetAdmins ¶
func (Self *TDingTalkClient) GetAdmins() (*TAdmins, error)
{"sys_level":2,"userid":"userid2"}, https://oapi.dingtalk.com/user/get_admin?access_token=ACCESS_TOKEN
func (*TDingTalkClient) GetDepartment ¶
func (Self *TDingTalkClient) GetDepartment(depid int) (*TDepartmentInfo, error)
https://oapi.dingtalk.com/department/get?access_token=ACCESS_TOKEN&id=123 获取部门详情
func (*TDingTalkClient) GetFullDepartmentName ¶
func (Self *TDingTalkClient) GetFullDepartmentName(depid int) (string, error)
func (*TDingTalkClient) GetJobName ¶
func (Self *TDingTalkClient) GetJobName(depids []int) (string, error)
func (*TDingTalkClient) GetLoginInfo ¶
func (Self *TDingTalkClient) GetLoginInfo(authcode string) (*TLoginInfo, error)
https://oapi.dingtalk.com/user/getuserinfo?access_token=access_token&code=code
func (*TDingTalkClient) GetOrgName ¶
func (Self *TDingTalkClient) GetOrgName(depids []int) (string, error)
func (*TDingTalkClient) GetUserInfo ¶
func (Self *TDingTalkClient) GetUserInfo(userid string) (*TUserInfo, error)
https://oapi.dingtalk.com/user/get?access_token=ACCESS_TOKEN&userid=zhangsan
func (*TDingTalkClient) GetUserInfoByPhone ¶
func (Self *TDingTalkClient) GetUserInfoByPhone(phone string) (*TUserInfo, error)
https://oapi.dingtalk.com/user/get_by_mobile?access_token=ACCESS_TOKEN&mobile=1xxxxxxxxxx
func (*TDingTalkClient) SendWorkNotify ¶
func (Self *TDingTalkClient) SendWorkNotify(msg string) (int, error)
type TLoginInfo ¶
func (*TLoginInfo) String ¶
func (Self *TLoginInfo) String() string
type TUserInfo ¶
type TUserInfo struct { TResult UUID string `json:"unionid"` UserId string `json:"userid"` StaffCode string `json:"jobnumber"` StaffName string `json:"name"` Email string `json:"email"` Phone string `json:"mobile"` Job string `json:"job"` Org string `json:"org"` Departments []int `json:"department"` //成员所属部门id列表 Position string `json:"position"` //职位信息 Avatar string `json:"avatar"` //头像url }
type TWorkNotify ¶
func (*TWorkNotify) String ¶
func (Self *TWorkNotify) String() string
type WorkWeixin ¶
type WorkWeixin struct { CorpID string CorpSecret string AgentID int Token string BeginTime time.Time EndTime time.Time }
func (*WorkWeixin) GetAccessToken ¶
func (w *WorkWeixin) GetAccessToken() string
func (*WorkWeixin) Init ¶
func (w *WorkWeixin) Init(corpid string, corpsecret string, agentId int)
adb shell am start -n org.autojs.autojs/.external.open.RunIntentActivity -d /sdcard/AData/MyJS/auto_run.js -t application/x-javascript
func (*WorkWeixin) SendMessage ¶
func (w *WorkWeixin) SendMessage(text string) bool
func (*WorkWeixin) SendUserMessage ¶
func (w *WorkWeixin) SendUserMessage(touser, text string) bool