<s> from libsaas import http , parsers <EOL> from libsaas . services import base <EOL> from . resource import BasecampResource <EOL> class AccessResource ( BasecampResource ) : <EOL> path = '<STR_LIT>' <EOL> def create ( self , * args , ** kwargs ) : <EOL> raise base . MethodNotSupported ( ) <EOL> def update ( self , * args , ** kwargs ) : <EOL> raise base . MethodNotSupported ( ) <EOL> def delete ( self , * args , ** kwargs ) : <EOL> raise base . MethodNotSupported ( ) <EOL> class Accesses ( AccessResource ) : <EOL> @ base . apimethod <EOL> def grant ( self , obj ) : <EOL> """<STR_LIT>""" <EOL> self . require_collection ( ) <EOL> request = http . Request ( '<STR_LIT:POST>' , self . get_url ( ) , self . wrap_object ( obj ) ) <EOL> return request , parsers . parse_empty <EOL> class Access ( AccessResource ) : <EOL> def get ( self , * args , ** kwargs ) : <EOL> raise base . MethodNotSupported ( ) <EOL> @ base . apimethod <EOL> def revoke ( self ) : <EOL> """<STR_LIT>""" <EOL> self . require_item ( ) <EOL> request = http . Request ( '<STR_LIT>' , self . get_url ( ) ) <EOL> return request , parsers . parse_empty </s>
