@@ -31,34 +31,34 @@ class Authorization(GitHubCore):
3131 """
3232
3333def _update_attributes (self ,auth ):
34- self ._api = self . _get_attribute ( auth , 'url' )
34+ self ._api = auth [ 'url' ]
3535
3636#: Details about the application (name, url)
37- self .app = self . _get_attribute ( auth , 'app' , {})
37+ self .app = auth [ 'app' ]
3838
3939#: Returns the Authorization token
40- self .token = self . _get_attribute ( auth , 'token' )
40+ self .token = auth [ 'token' ]
4141
4242#: App name
43- self .name = self ._get_attribute ( self . app , 'name' )
43+ self .name = self .app [ 'name' ]
4444
4545#: URL about the note
46- self .note_url = self . _get_attribute ( auth , 'note_url' )
46+ self .note_url = auth [ 'note_url' ]
4747
4848#: Note about the authorization
49- self .note = self . _get_attribute ( auth , 'note' )
49+ self .note = auth [ 'note' ]
5050
5151#: List of scopes this applies to
52- self .scopes = self . _get_attribute ( auth , 'scopes' )
52+ self .scopes = auth [ 'scopes' ]
5353
5454#: Unique id of the authorization
55- self .id = self . _get_attribute ( auth , 'id' )
55+ self .id = auth [ 'id' ]
5656
5757#: datetime object representing when the authorization was created.
58- self .created_at = self ._strptime_attribute (auth , 'created_at' )
58+ self .created_at = self ._strptime (auth [ 'created_at' ] )
5959
6060#: datetime object representing when the authorization was updated.
61- self .updated_at = self ._strptime_attribute (auth , 'updated_at' )
61+ self .updated_at = self ._strptime (auth [ 'updated_at' ] )
6262
6363def _repr (self ):
6464return '<Authorization [{0}]>' .format (self .name )