Learn R Programming

evolution (version 0.1.0)

send_location: Send a location

Description

Sends a geographic location pin via Evolution API v2.

Usage

send_location(
  client,
  number,
  latitude,
  longitude,
  name = NULL,
  address = NULL,
  verbose = FALSE
)

Value

A named list with the API response. The HTTP status code is stored in attr(result, "http_status").

Arguments

client

An evo_client() object.

number

Character. Recipient number with country code (e.g., "5581999990000" or "+5581999990000").

latitude

Numeric. Latitude coordinate.

longitude

Numeric. Longitude coordinate.

name

Optional character. Location label name.

address

Optional character. Address description.

verbose

Logical. If TRUE, logs request/response details with cli.

Examples

Run this code
if (FALSE) {
send_location(client, "5581999990000",
              latitude = -8.05, longitude = -34.88,
              name = "Recife Antigo", address = "Marco Zero")
}

Run the code above in your browser using DataLab