Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add checkin api, test included #254

Merged
merged 1 commit into from
Feb 28, 2019
Merged

add checkin api, test included #254

merged 1 commit into from
Feb 28, 2019

Conversation

hophacker
Copy link
Contributor

加入获取打卡数据的的API: https://work.weixin.qq.com/api/doc#11196

Test included, all tests passed.

@@ -24,6 +24,15 @@ def agent(agentid)
get 'agent/get', params: { agentid: agentid }
end

def checkin(useridlist, starttime = Time.now.beginning_of_day, endtime = Time.now.end_of_day, opencheckindatatype = 3)
post 'checkin/getcheckindata', JSON.generate(
useridlist: useridlist,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still better put useridlist at end of hash, maybe not relevant, but still better just following the document sequence.

Copy link
Contributor Author

@hophacker hophacker Feb 28, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normally we need to fetch checkin data of the current day, thus
starttime and endtime will be mostly default as the beginning of the current day and the end of the current day. opencheckindatatype will be mostly equal to 3, which means fetching the whole list. The only changing argument at the most time is useridlist.

@Eric-Guo Eric-Guo merged commit 7b25514 into Eric-Guo:master Feb 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants