Showing Direct Messages

Show direct message information.

Entity: DirectMessage
Type: DirectMessageType.Show
Parameters/Filters:
Name Purpose Type Required
ID Direct message ID ulong yes

v3.0 Example:
            var dmResponse =
                await
                    (from dm in twitterCtx.DirectMessage
                     where dm.Type == DirectMessageType.Show &&
                           dm.ID == 2078013265
                     select dm)
                    .SingleOrDefaultAsync();

            if (dmResponse != null &&
                dmResponse.Recipient != null &&
                dmResponse.Sender != null)
            {
                Console.WriteLine(
                    "From: {0}\nTo:  {1}\nMessage: {2}",
                    dmResponse.Sender.Name,
                    dmResponse.Recipient.Name,
                    dmResponse.Text);
            }
v2.1 Example:
            var directMsg =
                (from dm in twitterCtx.DirectMessage
                 where dm.Type == DirectMessageType.Show &&
                       dm.ID == 2078013265
                 select dm)
                .SingleOrDefault();

            Console.WriteLine(
                "From: {0}\nTo:  {1}\nMessage: {2}",
                directMsg.Sender.Name,
                directMsg.Recipient.Name,
                directMsg.Text);

Twitter API: direct_messages/show

Last edited Nov 29, 2013 at 3:23 AM by JoeMayo, version 3