direct_messages_received: (DEPRECATED) Get the most recent direct messages sent to the...

View source: R/direct_messages.R

direct_messages_receivedR Documentation

(DEPRECATED) Get the most recent direct messages sent to the authenticating user.

Description

Retrieves up to 200 of the most recently received direct messages by the authenticating (home) user. This function requires access token with read, write, and direct messages access.

Usage

direct_messages_received(
  since_id = NULL,
  max_id = NULL,
  n = 200,
  parse = TRUE,
  token = NULL
)

direct_messages_sent(
  since_id = NULL,
  max_id = NULL,
  n = 200,
  parse = TRUE,
  token = NULL
)

Details

Includes detailed information about the sender and recipient user. You can request up to 200 direct messages per call, and only the most recent 200 direct messages will be available using this endpoint.

Value

Return object converted to nested list. If status code of response object is not 200, the response object is returned directly.

Examples


## Not run: 

## get my direct messages
dms <- direct_messages_received()

## inspect data structure
str(dms)

## get direct messages I've sent
sdms <- direct_messages_sent()

## inspect data structure
str(dms)


## End(Not run)


rtweet documentation built on July 21, 2022, 5:10 p.m.