Packages

Auto-generated Elixir client for the X (Twitter) API v2

Current section

Files

Jump to
xdk_elixir lib xdk usage.ex
Raw

lib/xdk/usage.ex

# AUTO-GENERATED FILE - DO NOT EDIT
# This file was automatically generated by the XDK build tool.
# Any manual changes will be overwritten on the next generation.
defmodule Xdk.Usage do
@moduledoc "Auto-generated client for usage operations"
@doc """
Get usage
GET /2/usage/tweets
Retrieves usage statistics for Posts over a specified number of days.
"""
@spec get(Xdk.t(), opts :: keyword()) :: {:ok, map()} | {:error, Xdk.Errors.error()}
def get(client, opts \\ []) do
query =
[
{"days", Keyword.get(opts, :days)},
{"usage.fields", Keyword.get(opts, :usage_fields)}
]
|> Xdk.Query.build()
Xdk.request(client, :get, "/2/usage/tweets", query: query)
end
end