@staticmethod
  def NewFromJsonDict(data):
    if 'sender' in data:
      sender = User.NewFromJsonDict(data['sender'])
    else:
      sender = None
    return DirectMessage(created_at=data.get('created_at', None),
                         recipient_id=data.get('recipient_id', None),
                         sender=sender,
                         sender_id=data.get('sender_id', None),
                         text=data.get('text', None),
                         sender_screen_name=data.get('sender_screen_name', None),
                         id=data.get('id', None),
                         recipient_screen_name=data.get('recipient_screen_name', None))
Create a new instance based on a JSON dict.
dataset/ETHPy150Open livid/v2ex/twitter/twitter.py/DirectMessage.NewFromJsonDict