<s> from libsaas import http , parsers <EOL> from libsaas . services import base <EOL> from . import resource <EOL> class MembersBase ( resource . GitHubResource ) : <EOL> path = '<STR_LIT>' <EOL> class Members ( MembersBase ) : <EOL> def create ( self , * args , ** kwargs ) : <EOL> raise base . MethodNotSupported ( ) <EOL> def delete ( self , * args , ** kwargs ) : <EOL> raise base . MethodNotSupported ( ) <EOL> def update ( self , * args , ** kwargs ) : <EOL> raise base . MethodNotSupported ( ) <EOL> class Member ( MembersBase ) : <EOL> def create ( self , * args , ** kwargs ) : <EOL> raise base . MethodNotSupported ( ) <EOL> def update ( self , * args , ** kwargs ) : <EOL> raise base . MethodNotSupported ( ) <EOL> class PublicMembersBase ( resource . GitHubResource ) : <EOL> path = '<STR_LIT>' <EOL> class PublicMembers ( PublicMembersBase ) : <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 PublicMember ( PublicMembersBase ) : <EOL> @ base . apimethod <EOL> def publicize ( self ) : <EOL> request = http . Request ( '<STR_LIT>' , self . get_url ( ) ) <EOL> return request , parsers . parse_json <EOL> def create ( self , * args , ** kwargs ) : <EOL> raise base . MethodNotSupported ( ) <EOL> def update ( self , * args , ** kwargs ) : <EOL> raise base . MethodNotSupported ( ) <EOL> class UserMembership ( resource . GitHubResource ) : <EOL> @ base . apimethod <EOL> def get ( self ) : <EOL> request = http . Request ( '<STR_LIT:GET>' , <EOL> '<STR_LIT>' . format ( self . parent . get_url ( ) , self . object_id ) ) <EOL> return request , parsers . parse_json <EOL> @ base . apimethod <EOL> def update ( self , obj ) : <EOL> request = http . Request ( '<STR_LIT>' , <EOL> '<STR_LIT>' . format ( self . parent . get_url ( ) , self . object_id ) , <EOL> obj ) <EOL> return request , parsers . parse_json <EOL> class UserMemberships ( resource . GitHubResource ) : <EOL> path = '<STR_LIT>' <EOL> @ base . apimethod <EOL> def get ( self , state = None ) : <EOL> """<STR_LIT>""" <EOL> params = base . get_params ( ( '<STR_LIT:state>' , ) , locals ( ) ) <EOL> request = http . Request ( '<STR_LIT:GET>' , self . get_url ( ) , params ) <EOL> return request , parsers . parse_json <EOL> @ base . resource ( UserMembership ) <EOL> def org ( self , org ) : <EOL> """<STR_LIT>""" <EOL> return UserMembership ( self , org ) </s>
