<s> from libsaas import http , parsers <EOL> from libsaas . services import base <EOL> from . import resource , labels <EOL> class MilestonesBase ( resource . GitHubResource ) : <EOL> path = '<STR_LIT>' <EOL> def get_url ( self ) : <EOL> if self . object_id is None : <EOL> return '<STR_LIT>' . format ( self . parent . get_url ( ) , self . path ) <EOL> return '<STR_LIT>' . format ( self . parent . get_url ( ) , self . path , <EOL> self . object_id ) <EOL> class Milestone ( MilestonesBase ) : <EOL> @ base . resource ( labels . MilestoneLabels ) <EOL> def labels ( self ) : <EOL> """<STR_LIT>""" <EOL> return labels . MilestoneLabels ( self ) <EOL> class Milestones ( MilestonesBase ) : <EOL> @ base . apimethod <EOL> def get ( self , state = '<STR_LIT>' , sort = '<STR_LIT>' , direction = '<STR_LIT>' , <EOL> page = None , per_page = None ) : <EOL> """<STR_LIT>""" <EOL> url = self . get_url ( ) <EOL> params = base . get_params ( <EOL> ( '<STR_LIT:state>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) , locals ( ) ) <EOL> return http . Request ( '<STR_LIT:GET>' , url , params ) , parsers . parse_json <EOL> get . __doc__ = get . __doc__ . format ( <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' ) </s>
