<s> from libsaas import http , parsers <EOL> from libsaas . services import base <EOL> from . resource import BasecampResource <EOL> from . comments import Comments <EOL> class TodoResource ( BasecampResource ) : <EOL> path = '<STR_LIT>' <EOL> class Todos ( TodoResource ) : <EOL> def get ( self , * args , ** kwargs ) : <EOL> raise base . MethodNotSupported ( ) <EOL> class Todo ( TodoResource ) : <EOL> @ base . resource ( Comments ) <EOL> def comments ( self ) : <EOL> """<STR_LIT>""" <EOL> return Comments ( self ) <EOL> class TodolistResource ( BasecampResource ) : <EOL> path = '<STR_LIT>' <EOL> class Todolists ( TodolistResource ) : <EOL> @ base . apimethod <EOL> def completed ( self ) : <EOL> url = '<STR_LIT>' . format ( self . get_url ( ) ) <EOL> request = http . Request ( '<STR_LIT:GET>' , url , { } ) <EOL> return request , parsers . parse_json <EOL> class GlobalTodolists ( TodolistResource ) : <EOL> def create ( self , * args , ** kwargs ) : <EOL> raise base . MethodNotSupported ( ) <EOL> @ base . apimethod <EOL> def completed ( self ) : <EOL> url = '<STR_LIT>' . format ( self . get_url ( ) ) <EOL> request = http . Request ( '<STR_LIT:GET>' , url , { } ) <EOL> return request , parsers . parse_json <EOL> class AssignedTodos ( TodolistResource ) : <EOL> path = '<STR_LIT>' <EOL> def create ( self , * args , ** kwargs ) : <EOL> raise base . MethodNotSupported ( ) <EOL> class Todolist ( TodolistResource ) : <EOL> @ base . resource ( Todos ) <EOL> def todos ( self ) : <EOL> """<STR_LIT>""" <EOL> return Todos ( self ) </s>
