@@ -55,7 +55,6 @@ def new_from_dict(cls, d, h=None):
5555
5656
5757class Addon (BaseResource ):
58-
5958 _strs = ['name' , 'description' , 'url' , 'state' ]
6059 _bools = ['beta' ,]
6160
@@ -73,43 +72,70 @@ def __init__(self):
7372 def __repr__ (self ):
7473 return "<app '%s'>" % (self .name )
7574
75+ def collaborators (self ):
76+ return self ._h ._get_resources (
77+ resource = ('apps' , self .name , 'collaborators' ),
78+ obj = Collaborator
79+ )
80+
81+ def domains (self ):
82+ return self ._h ._get_resources (
83+ resource = ('apps' , self .name , 'domains' ),
84+ obj = Domain
85+ )
86+
7687
7788class Collaborator (BaseResource ):
89+ _strs = ['access' , 'email' ]
90+
7891 def __init__ (self ):
79- super (App , self ).__init__ ()
92+ super (Collaborator , self ).__init__ ()
8093
94+ def __repr__ (self ):
95+ return "<collaborator '%s'>" % (self .email )
96+
97+
98+ # class ConfigVars(BaseResource):
99+ # def __init__(self):
100+ # super(ConfigVars, self).__init__()
81101
82- class Config (BaseResource ):
83- def __init__ (self ):
84- super (App , self ).__init__ ()
85102
86103class Domain (BaseResource ):
104+
105+ _ints = ['id' , 'app_id' , ]
106+ _strs = ['domain' , 'base_domain' , 'default' ]
107+ _dates = ['created_at' , 'updated_at' ]
108+
109+
87110 def __init__ (self ):
88- super (App , self ).__init__ ()
111+ super (Domain , self ).__init__ ()
112+
113+ def __repr__ (self ):
114+ return "<domain '%s'>" % (self .domain )
89115
90116
91117class Key (BaseResource ):
92118 def __init__ (self ):
93- super (App , self ).__init__ ()
119+ super (Key , self ).__init__ ()
94120
95121
96122class Log (BaseResource ):
97123 def __init__ (self ):
98- super (App , self ).__init__ ()
124+ super (Log , self ).__init__ ()
99125
100126
101127class Process (BaseResource ):
102128 def __init__ (self ):
103- super (App , self ).__init__ ()
129+ super (Process , self ).__init__ ()
104130
105131
106132class Release (BaseResource ):
107133 def __init__ (self ):
108- super (App , self ).__init__ ()
134+ super (Release , self ).__init__ ()
109135
110136
111137class Stack (BaseResource ):
112138 def __init__ (self ):
113- super (App , self ).__init__ ()
139+ super (Stack , self ).__init__ ()
114140
115141
0 commit comments