def GetDirectMessages(self, since=None, since_id=None, page=None):
    url = TWITTER_API_ROOT + 'direct_messages.json'
    if not self._username:
      raise TwitterError("The twitter.Api instance must be authenticated.")
    parameters = {}
    if since:
      parameters['since'] = since
    if since_id:
      parameters['since_id'] = since_id
    if page:
      parameters['page'] = page 
    json = self._FetchUrl(url, parameters=parameters)
    data = simplejson.loads(json)
    self._CheckForTwitterError(data)
    return [DirectMessage.NewFromJsonDict(x) for x in data]
Serializes to JSON by inspecting `elementProperties()` and creating
dataset/ETHPy150Open livid/v2ex/twitter/twitter.py/Api.GetDirectMessages--crossover with--dataset/ETHPy150Open smart-on-fhir/client-py/fhirclient/models/fhirabstractbase.py/FHIRAbstractBase.as_json