api icon indicating copy to clipboard operation
api copied to clipboard

Document how to tell whether a list is shared

Open troy opened this issue 10 years ago • 1 comments

I'm trying to figure out how to get the most typical set of tasks owned by or assigned to a user. That means all tasks in un-shared lists and tasks assigned to the user in shared lists.

As of this writing, the example reply for the lists API call doesn't cover owner_type, which seems to indicate whether a list is shared. The example response for the tasks API call mentions assignee_id, but doesn't describe the meaning of a nil value or the key not being present at all. After some investigation, I see that assignee_id is not present in some cases, and I'm currently inferring that means that it's in an un-shared list. That's just a guess, though.

Given that there's no API call to request all tasks owned by or assigned to the API key owner, the next best thing would be documenting how to tell the sharing status of a list. Memberships shows ownership, but doesn't seem to show enough to infer task ownership for cases where assignee_id is not present or nil.

troy avatar Jan 23 '16 18:01 troy

@troy I use the owner_id attribute and compare it to the user's id, to determine if the list is owned by someone else (and therefore must be shared to the current user).

drcharris avatar Dec 08 '16 18:12 drcharris