spectatorAvailableTicketsGet
Get available tickets for the mobile side. This is a split from legacy spectator/tickets GET, and is more lightweight compare to before
/spectator/available-tickets
Usage and SDK Samples
curl -X GET \
-H "Authorization: [[apiKey]]" \
-H "Accept: application/json" \
"https://api.tixngo.io/prod/_legacy/spectator/available-tickets"
import com.secutix.tixngo._legacy.*;
import com.secutix.tixngo._legacy.auth.*;
import com.secutix.tixngo._legacy.model.*;
import com.secutix.tixngo._legacy.api.DefaultApi;
import java.io.File;
import java.util.*;
public class DefaultApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: tyxr-spectators
ApiKeyAuth tyxr-spectators = (ApiKeyAuth) defaultClient.getAuthentication("tyxr-spectators");
tyxr-spectators.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//tyxr-spectators.setApiKeyPrefix("Token");
// Create an instance of the API class
DefaultApi apiInstance = new DefaultApi();
try {
SpectatorAvailableTicketsResponse result = apiInstance.spectatorAvailableTicketsGet();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#spectatorAvailableTicketsGet");
e.printStackTrace();
}
}
}
import 'package:openapi/api.dart';
final api_instance = DefaultApi();
try {
final result = await api_instance.spectatorAvailableTicketsGet();
print(result);
} catch (e) {
print('Exception when calling DefaultApi->spectatorAvailableTicketsGet: $e\n');
}
import com.secutix.tixngo._legacy.api.DefaultApi;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
try {
SpectatorAvailableTicketsResponse result = apiInstance.spectatorAvailableTicketsGet();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#spectatorAvailableTicketsGet");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: tyxr-spectators)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
[apiInstance spectatorAvailableTicketsGetWithCompletionHandler:
^(SpectatorAvailableTicketsResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var TixngoRestApiBackendSpectatorApi = require('tixngo_rest_api_backend_spectator_api');
var defaultClient = TixngoRestApiBackendSpectatorApi.ApiClient.instance;
// Configure API key authorization: tyxr-spectators
var tyxr-spectators = defaultClient.authentications['tyxr-spectators'];
tyxr-spectators.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//tyxr-spectators.apiKeyPrefix['Authorization'] = "Token";
// Create an instance of the API class
var api = new TixngoRestApiBackendSpectatorApi.DefaultApi()
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.spectatorAvailableTicketsGet(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class spectatorAvailableTicketsGetExample
{
public void main()
{
// Configure API key authorization: tyxr-spectators
Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
// Create an instance of the API class
var apiInstance = new DefaultApi();
try {
SpectatorAvailableTicketsResponse result = apiInstance.spectatorAvailableTicketsGet();
Debug.WriteLine(result);
} catch (Exception e) {
Debug.Print("Exception when calling DefaultApi.spectatorAvailableTicketsGet: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: tyxr-spectators
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
try {
$result = $api_instance->spectatorAvailableTicketsGet();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->spectatorAvailableTicketsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;
# Configure API key authorization: tyxr-spectators
$WWW::OPenAPIClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";
# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
eval {
my $result = $api_instance->spectatorAvailableTicketsGet();
print Dumper($result);
};
if ($@) {
warn "Exception when calling DefaultApi->spectatorAvailableTicketsGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: tyxr-spectators
openapi_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['Authorization'] = 'Bearer'
# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
try:
api_response = api_instance.spectator_available_tickets_get()
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->spectatorAvailableTicketsGet: %s\n" % e)
extern crate DefaultApi;
pub fn main() {
let mut context = DefaultApi::Context::default();
let result = client.spectatorAvailableTicketsGet(&context).wait();
println!("{:?}", result);
}