basecampy3 icon indicating copy to clipboard operation
basecampy3 copied to clipboard

todo's under a todolist group

Open slash5k1 opened this issue 7 years ago • 2 comments

Hi,

I started looking in to the basecamp api and came across your package and wondered if it was possible to not only get todo's at the top level of a todo list but also within a todo group? ie:

screen shot 2018-11-03 at 9 34 56 pm

slash5k1 avatar Nov 03 '18 11:11 slash5k1

Just seen that you are yet to implement anything with your TodoListGroup class.

Making the following changes allowed me to see todos under a todo group:

  1. added list method
  2. changed inheritance of TodoListGroup to recordings.Recording; and
  3. added recordings to the import line.
from . import _base, projects, todolists, util, recordings

class TodoListGroup(recordings.Recording):

    def list(self, status=None, completed=None):
        return self._endpoint._api.todos.list(todolist=self, project=self.project_id,
                                              status=status, completed=completed)

Hope this helps someone else who finds your library 😃

BTW - you have implemented a fair amount of work in here... thankyou for uploading to GitHub to share! 👍

slash5k1 avatar Nov 03 '18 11:11 slash5k1

I would like to keep this issue open until I have implemented it. I hope it is ok with you. You are also welcome to submit a pull request with your proposed changes. Thanks for your interest!

phistrom avatar Nov 04 '18 18:11 phistrom