Skip to content

Latest commit

 

History

History
110 lines (87 loc) · 3.46 KB

File metadata and controls

110 lines (87 loc) · 3.46 KB

Unifapi.Sdk.Api.EventsApi

All URIs are relative to https://api.unifapi.com

Method HTTP request Description
EventsSearchPost POST /events/search Search Events

EventsSearchPost

EventsSearchPost200Response EventsSearchPost (EventsSearchRequest? eventsSearchRequest = null)

Search Events

Run one live Events search and receive individual events for a query, including title, dates, venue location, ticket links, and a description.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Unifapi.Sdk.Api;
using Unifapi.Sdk.Client;
using Unifapi.Sdk.Model;

namespace Example
{
    public class EventsSearchPostExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.unifapi.com";
            // Configure Bearer token for authorization: bearerAuth
            config.AccessToken = "YOUR_BEARER_TOKEN";

            var apiInstance = new EventsApi(config);
            var eventsSearchRequest = new EventsSearchRequest?(); // EventsSearchRequest? |  (optional) 

            try
            {
                // Search Events
                EventsSearchPost200Response result = apiInstance.EventsSearchPost(eventsSearchRequest);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling EventsApi.EventsSearchPost: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the EventsSearchPostWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Search Events
    ApiResponse<EventsSearchPost200Response> response = apiInstance.EventsSearchPostWithHttpInfo(eventsSearchRequest);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling EventsApi.EventsSearchPostWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
eventsSearchRequest EventsSearchRequest? [optional]

Return type

EventsSearchPost200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
400 Validation or invalid-id error -
401 Missing, invalid, disabled, revoked, or expired UnifAPI API key -
402 Insufficient workspace credits -
404 Resource not found -
429 Rate limited -
500 Internal error -
502 Source error -
503 Source unavailable -

[Back to top] [Back to API list] [Back to Model list] [Back to README]