Lines and connections in the /todos API route

The /user/todos api route currently lists boxes in the space that todos are from. Contextually, horizontal lines and connections also seem relevant to the todo context, so it’d be nice to have those returned as well :slight_smile:

2 Likes

hmm looking into this, the boxes that are returned are also todos so that makes sense.

but lines and connections can’t be todos, so that’s kind of muddy. Considering that there’ll be new datatypes like lists, it sounds like it might make more sense to also do a separate space call to get everything for the spaces that have todo items. It’s less efficient but I think it’s better overall to keep the api generalized to support a broad set of use cases

1 Like

I suppose my mental model of the api response involves lots of other space context anyhow like space name, background image, etc. Lines and boxes feel like they’re part of the outline/formatting of the space, connections feel like metadata of todo cards. Perhaps only the connections between todo cards should be included in the response? Perhaps that can be a separate endpoint, /todos/connections or /todos/meta?

Lists are an interesting case though, will lists be able to be todos themselves?

I really appreciate you looking into this though! Thank you!

Lists are an interesting case though, will lists be able to be todos themselves?

not in v1. could happen later pending demand. But I don’t see too many people using box todos so I’m not sure yet if it’d be used IRL

mental model of the api response

I see it as a per request thing. not all api responses include all the data on the space, in this case the /card/todos is primarily about getting those card todos. An endpoint like this is atomic. For some use cases you will need to tie multiple responses together.

the thinking behind a small atomic endpoint is that when getting all the todos you may or may not want associated space/connection data (depending on use case). But when fetching/rechecking the todos (to see if they’ve been renamed, removed, or completed), you’ll get a faster response. And if you also want to recheck the space/connection data , you can choose how often you want to do that relatively slower call.