

@classmethod
def parse(cls, api, json):
    dm = cls(api)
    for (k, v) in json.items():
        if ((k == 'sender') or (k == 'recipient')):
            setattr(dm, k, User.parse(api, v))
        elif (k == 'created_at'):
            setattr(dm, k, parse_datetime(v))
        else:
            setattr(dm, k, v)
    return json

dataset/ETHPy150Open balanced/status.balancedpayments.com/situation/tweepy/models.py DirectMessage.parse/VarMisuse@111/125 `dm`->`json`