Skip to contents

This function initializes and returns an OAuth client for authenticating with the Meetup API. It requires the Meetup client ID and secret, which can be passed as arguments or retrieved from environment variables.

Usage

meetup_client(
  client_id = NULL,
  client_secret = NULL,
  client_name = Sys.getenv("MEETUP_CLIENT_NAME", "meetupr"),
  ...
)

Arguments

client_id

A string representing the Meetup client ID. By default, it is retrieved from the meetup:client_id environment variable.

client_secret

A string representing the Meetup client secret. By default, it is retrieved from the meetup:client_secret environment variable.

client_name

A string representing the name of the client. By default, it is set to "meetupr" and retrieved from the MEETUP_CLIENT_NAME environment variable.

...

Additional arguments passed to the httr2::oauth_client function.

Value

An OAuth client object created with the httr2::oauth_client function. This client can be used to handle authentication with the Meetup API.

Details

If the client_id or client_secret parameters are empty, the function will throw an error prompting you to set the meetup:client_id and meetup:client_secret environment variables.

Examples

if (FALSE) { # \dontrun{
# Example 1: Using environment variables to set credentials
client <- meetup_client()

# Example 2: Passing client ID and secret as arguments
client <- meetup_client(
  client_id = "your_client_id",
  client_secret = "your_client_secret"
)
} # }