I can now identify that 10,000 chess.com members from my region have logged in in the last 24 hours, can screen the ones that are active on live chess or daily or 960 and are not members of the regional team, and can invite them manually.
Hi!
How do you do that?
The Public API initiative has enabled many potential scenarios where the data can be leveraged to benefit user communities here at the site. Sometimes the intended usage is quite specialized, other times there are very good ideas that could eventually be implemented by chess.com in the future.
With the new API it is now easy to find good candidates for some clubs (e.g. national or regional teams playing in leagues) incrementing not only the membership but also the fit of new members and clubs.
However, there are areas where automation is desirable. I can now identify that 10,000 chess.com members from my region have logged in in the last 24 hours, can screen the ones that are active on live chess or daily or 960 and are not members of the regional team, and can invite them manually.
It would help a lot to have a way to invite members using the API if someone has a club admin login.
Like:
1) Script sends 1 to 30 usernames plus invitation message to candidate member (individual requests or batch requests)
Preconditions: Script has appropriate agent identification header and is able to send credentials in a couple of ways (admin user OR BOT USER and password through HTTPS connection) or (submitting API key linked to a human or bot user)
The script has a way to take account of opt-out preferences
Postconditions: The API returns whether the invitation was successfully sent or an exception (user is already a member or user does not accept invitations/messages, etc.)
Alternatives to improve current status: 1) chess.com enables invitations to be sent to a larger number of users per day (e.g. 100 - currently capped at 30)
I understand this could be done scrapping the UI and posting the forms with automated tools like selenium webdriver. It was easier in the old app, still possible in the new one. But I think it is a) more difficult; b) has less control to maintain opt-outs and c) not sure the terms of service covers usage of the API through automated scripts to send invitations, messages, etc.
2) We also send many PM via the app (or through whatsapp) when the time to move reaches a critical point. Automating those kind of messages would be another example of a possible API interaction, but I think that could easily be done by chess.com by sending alerts at 12, 8, 4, 1 hours before losing, if the user agrees to be chased... currently I understand there is an alert at 8 hours and another one later.
I understand that providing the ability to send scripted invitations might be outside of the scope of the Public API, but it would help if some guidance is provided (e.g. do scrapping and automate posts through the UI | terms of service would accept or reject that | etc.) So far it takes a lot of human effort (but a very good benefit for us and for members of regional teams) something that could eventually be automated.
Comments?