gistapi/core.py
def from_api(jsondict):
        """Returns new instance of GistComment containing given api dict."""
        comment = GistComment()
        
        comment.body = jsondict.get('body', None)
        comment.created_at = datetime.strptime(jsondict.get('created_at')[:-6], '%Y/%m/%d %H:%M:%S')
        comment.gravatar_id = jsondict.get('gravatar_id', None)
        comment.id = jsondict.get('id', None)
        comment.updated_at = datetime.strptime(jsondict.get('updated_at')[:-6], '%Y/%m/%d %H:%M:%S')
        comment.user = jsondict.get('user', None)
        
        return comment
Returns new instance of GistComment containing given api dict.
Returns new instance of GistComment containing given api dict.
Returns new instance of GistComment containing given api dict .
def from_api(jsondict):
        comment = GistComment()
        comment.body = jsondict.get('body', None)
        comment.created_at = datetime.strptime(jsondict.get('created_at')[:-6], '%Y/%m/%d %H:%M:%S')
        comment.gravatar_id = jsondict.get('gravatar_id', None)
        comment.id = jsondict.get('id', None)
        comment.updated_at = datetime.strptime(jsondict.get('updated_at')[:-6], '%Y/%m/%d %H:%M:%S')
        comment.user = jsondict.get('user', None)
        return comment
def from_api ( jsondict ) : comment = GistComment ( ) comment . body = jsondict . get ( 'body' , None ) comment . created_at = datetime . strptime ( jsondict . get ( 'created_at' ) [ : - 6 ] , '%Y/%m/%d %H:%M:%S' ) comment . gravatar_id = jsondict . get ( 'gravatar_id' , None ) comment . id = jsondict . get ( 'id' , None ) comment . updated_at = datetime . strptime ( jsondict . get ( 'updated_at' ) [ : - 6 ] , '%Y/%m/%d %H:%M:%S' ) comment . user = jsondict . get ( 'user' , None ) return comment
Returns new instance of GistComment containing given api dict.
Returns new instance of GistComment containing given api dict .
"""Returns new instance of GistComment containing given api dict."""
jsondict