Closed mbernst closed 6 years ago
public endpoint doesn't work, i.e anyone can request that data which is not desirable also the constitution as we have seen is VERY vague when it comes to specifying these things so nothing to be done here, if an export is needed let me know
OK. I'm going to reopen this and specify things more clearly tomorrow.
So for now it would be useful for the voting system on the forum to be able to access this information. Not sure the best way to authenticate that, but lets talk about that, especially with the interns to see if they have something in mind. Presumably we'd basically make a list of users of each type available to the voting system.
For workers, activity consists of submitting at least one task on a day. If a worker submits one task, they're active as a worker that day. Additionally if they submit a returned task, they're active that day.
For requesters, activity consists of releasing a project or reviewing a submission. Again, if they do either of those things on a day, we count that day as active from a requester perspective.
Active community members are people who are active by these definitions on at least 5 unique days out of the last 30 days.
People can do both in one day, and people can be active in both categories (worker and requester). If a user does both activities, they are counted for activities that they did on 40% or more of their active days. Some examples to make this point are as follows:
Bill works 3 days, and requests 7 other days in the last month. Bill is only a requester. Jen works 3 days, and requests on those days, plus 4 more in the last month. Jen can choose for her vote to be counted as a worker or a requester.
Just a thought, consider a case - a worker do not have any tasks to submit A requestor do not have any thing to review or post
Both comment/ post in the Daemo Forum. Do they consider as active? I feel they should.
Yea. @shirishgoyal also made this point. (sorry I forgot to include it when writing this up)
@kjlaw check out the commit that closes this to see how the user status is made available.
/v1/user/activity/
will give you the thing you asked for
{
"worker": boolean,
"requester": boolean
}
true | false depending on if they meet the criteria specified above
We will need these queries in order to verify Constitution votes. For now it would be sufficient to have a publicly visible JSON endpoint of everyone who matches the worker criteria and everyone who matches the requester criteria.