XApiEx.Api.UsagePosts (x_api_ex v1.0.0)

API calls for all endpoints tagged UsagePosts.

Summary

Functions

Get Posts Usage Returns the Posts usage at a project and client app level For full details, see the API reference for this endpoint. Sign up for the X API

Functions

get_posts_usage(connection, opts \\ [])

@spec get_posts_usage(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, XApiEx.Model.ApiError.t()}
  | {:ok, XApiEx.Model.GetPostsUsage200Response.t()}
  | {:ok, XApiEx.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

Get Posts Usage Returns the Posts usage at a project and client app level For full details, see the API reference for this endpoint. Sign up for the X API

Parameters

  • connection (XApiEx.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :"usage.fields" (String.t): Comma-separated list of fields for the usage object. Allowed values: cap_reset_day,daily_client_app_usage,daily_project_usage,project_cap,project_id,project_usage Default values: cap_reset_day,project_cap,project_id,project_usage
    • :days (String.t): Number of days for which you want the usage for

Returns

  • {:ok, XApiEx.Model.GetPostsUsage200Response.t} on success
  • {:error, Tesla.Env.t} on failure