Tribe__Tickets__REST__V1__Endpoints__Ticket_Archive::READ_args()
Returns the content of the args array that should be used to register the endpoint with the register_rest_route function.
Return
(array)
Source
File: src/Tribe/REST/V1/Endpoints/Ticket_Archive.php
public function READ_args() {
return array(
'page' => array(
'description' => __( 'The page of results to return; defaults to 1', 'event-tickets' ),
'type' => 'integer',
'default' => 1,
'sanitize_callback' => 'absint',
'minimum' => 1,
),
'per_page' => array(
'description' => __( 'How many tickets to return per results page; defaults to posts_per_page.', 'event-tickets' ),
'type' => 'integer',
'default' => get_option( 'posts_per_page' ),
'minimum' => 1,
'maximum' => 100,
'sanitize_callback' => 'absint',
),
'search' => array(
'description' => __( 'Limit results to tickets containing the specified string in the title or description.', 'event-tickets' ),
'type' => 'string',
'required' => false,
'validate_callback' => array( $this->validator, 'is_string' ),
),
'offset' => array(
'description' => __( 'Offset the results by a specific number of items.', 'event-tickets' ),
'type' => 'integer',
'required' => false,
'min' => 0,
),
'order' => array(
'description' => __( 'Sort results in ASC or DESC order. Defaults to ASC.', 'event-tickets' ),
'type' => 'string',
'required' => false,
'enum' => array(
'ASC',
'DESC',
),
),
'orderby' => array(
'description' => __( 'Order the results by one of date, relevance, id, include, title, or slug; defaults to title.', 'event-tickets' ),
'type' => 'string',
'required' => false,
'enum' => array(
'id',
'include',
'title',
'slug',
),
),
'is_available' => array(
'description' => __( 'Limit results to tickets that have or do not have capacity currently available.', 'event-tickets' ),
'type' => 'boolean',
'required' => false,
),
'provider' => array(
'description' => __( 'Limit results to tickets provided by one of the providers specified in the CSV list or array; defaults to all available.', 'event-tickets' ),
'required' => false,
'sanitize-callback' => array( 'Tribe__Utils__Array', 'list_to_array' ),
'swagger_type' => array(
'oneOf' => array(
array( 'type' => 'array', 'items' => array( 'type' => 'string' ) ),
array( 'type' => 'string' ),
),
),
),
'after' => array(
'description' => __( 'Limit results to tickets created after or on the specified UTC date or timestamp.', 'event-tickets' ),
'type' => 'string',
'required' => false,
'validate_callback' => array( $this->validator, 'is_time' ),
),
'before' => array(
'description' => __( 'Limit results to tickets created before or on the specified UTC date or timestamp.', 'event-tickets' ),
'type' => 'string',
'required' => false,
'validate_callback' => array( $this->validator, 'is_time' ),
),
'include' => array(
'description' => __( 'Limit results to a specific CSV list or array of ticket IDs.', 'event-tickets' ),
'required' => false,
'validate_callback' => array( $this->validator, 'is_positive_int_list' ),
'sanitize_callback' => array( 'Tribe__Utils__Array', 'list_to_array' ),
'swagger_type' => array(
'oneOf' => array(
array( 'type' => 'array', 'items' => array( 'type' => 'integer' ) ),
array( 'type' => 'string' ),
array( 'type' => 'integer' ),
),
),
),
'exclude' => array(
'description' => __( 'Exclude a specific CSV list or array of ticket IDs from the results.', 'event-tickets' ),
'required' => false,
'validate_callback' => array( $this->validator, 'is_positive_int_list' ),
'sanitize_callback' => array( 'Tribe__Utils__Array', 'list_to_array' ),
'swagger_type' => array(
'oneOf' => array(
array( 'type' => 'array', 'items' => array( 'type' => 'integer' ) ),
array( 'type' => 'string' ),
array( 'type' => 'integer' ),
),
),
),
'include_post' => array(
'description' => __( 'Limit results to tickets that are assigned to one of the posts specified in the CSV list or array.', 'event-tickets' ),
'required' => false,
'validate_callback' => array( $this->validator, 'is_post_id_list' ),
'sanitize_callback' => array( $this->validator, 'list_to_array' ),
'swagger_type' => array(
'oneOf' => array(
array( 'type' => 'array', 'items' => array( 'type' => 'integer' ) ),
array( 'type' => 'string' ),
array( 'type' => 'integer' ),
),
),
),
'exclude_post' => array(
'description' => __( 'Limit results to tickets that are not assigned to any of the posts specified in the CSV list or array.', 'event-tickets' ),
'required' => false,
'validate_callback' => array( $this->validator, 'is_post_id_list' ),
'sanitize_callback' => array( $this->validator, 'list_to_array' ),
'swagger_type' => array(
'oneOf' => array(
array( 'type' => 'array', 'items' => array( 'type' => 'integer' ) ),
array( 'type' => 'string' ),
array( 'type' => 'integer' ),
),
),
),
'attendees_min' => array(
'description' => __( 'Limit results to tickets that have at least this number or attendees.', 'event-tickets' ),
'required' => false,
'type' => 'integer',
'min' => 0,
),
'attendees_max' => array(
'description' => __( 'Limit results to tickets that have at most this number of attendees.', 'event-tickets' ),
'required' => false,
'type' => 'integer',
'min' => 0,
),
'checkedin_min' => array(
'description' => __( 'Limit results to tickets that have at most this number of checked-in attendee.', 'event-tickets' ),
'required' => false,
'type' => 'integer',
'min' => 0,
),
'checkedin_max' => array(
'description' => __( 'Limit results to tickets that have at least this number of checked-in attendees.', 'event-tickets' ),
'required' => false,
'type' => 'integer',
'min' => 0,
),
'capacity_min' => array(
'description' => __( 'Limit results to tickets that have at least this capacity.', 'event-tickets' ),
'required' => false,
'type' => 'integer',
'min' => 0,
),
'capacity_max' => array(
'description' => __( 'Limit results to tickets that have at most this capacity.', 'event-tickets' ),
'required' => false,
'type' => 'integer',
'min' => 0,
),
'available_from' => array(
'description' => __( 'Limit results to tickets that will be available at or after the specified UTC date (parseable by strtotime) or timestamp.', 'event-tickets' ),
'type' => 'string',
'required' => false,
'validate_callback' => array( $this->validator, 'is_time' ),
),
'available_until' => array(
'description' => __( 'Limit results to tickets that will be available up to the specified UTC date (parseable by strtotime) or timestamp.', 'event-tickets' ),
'type' => 'string',
'required' => false,
'validate_callback' => array( $this->validator, 'is_time' ),
),
'post_status' => array(
'description' => __( 'Limit results to tickets assigned to posts that are in one of the post statuses specified in the CSV list or array; defaults to publish.', 'event-tickets' ),
'required' => false,
'sanitize_callback' => array( 'Tribe__Utils__Array', 'list_to_array' ),
'swagger_type' => array(
'oneOf' => array(
array( 'type' => 'array', 'items' => array( 'type' => 'string' ) ),
array( 'type' => 'string' ),
),
),
),
'status' => array(
'description' => __( 'Limit results to tickets that are in one of post statuses specified in the CSV list or array; defaults to publish.', 'event-tickets' ),
'required' => false,
'sanitize_callback' => array( 'Tribe__Utils__Array', 'list_to_array' ),
'swagger_type' => array(
'oneOf' => array(
array( 'type' => 'array', 'items' => array( 'type' => 'string' ) ),
array( 'type' => 'string' ),
),
),
),
'currency' => array(
'description' => __( 'Limit results to tickets priced in one of the 3-letter currency codes specified in the CSV list or array.', 'event-tickets' ),
'required' => false,
'swagger_type' => array(
'oneOf' => array(
array( 'type' => 'array', 'items' => array( 'type' => 'string' ) ),
array( 'type' => 'string' ),
),
),
),
'attendee_information_available' => array(
'description' => __( 'Limit results to tickets that provide attendees the possibility to fill in additional information or not; requires ET+.', 'event-tickets' ),
'required' => false,
'type' => 'boolean',
),
);
}