PS2.API.Query (PlanetSide 2 API v1.0.0)

View Source

A data structure representing an API query. Create a struct using %PS2.API.Query{} or the new/0 or new/1 functions.

Summary

Types

The key of a term is the field name, and the value is the sort direction. Set the value to nil for the default sort direction.

t()

Functions

Encodes a Query as a URL, using the given

Types

opts()

@type opts() :: Keyword.t()

sort_terms()

@type sort_terms() :: map() | Keyword.t()

The key of a term is the field name, and the value is the sort direction. Set the value to nil for the default sort direction.

t()

@type t() :: %PS2.API.Query{
  collection: String.t(),
  joins: [PS2.API.Query.Join.t()],
  params: map(),
  sort: sort_terms() | nil,
  tree: PS2.API.Query.Tree.t() | nil
}

Functions

encode(query)

@spec encode(t()) :: URI.t()

Encodes a Query as a URL, using the given

new(opts \\ [])

@spec new(opts()) :: t()