Skip to content
SDK for Ticketmaster API
C#
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Release 2.0.2 Jun 22, 2019
.gitattributes
.gitignore
CODE_OF_CONDUCT.md Created CODE_OF_CONDUCT.md File Jan 23, 2018
CONTRIBUTING.md Created CONTRIBUTING.md Jan 23, 2018
LICENSE.md Updated LICENSE file Mar 19, 2018
README.md

README.md

Ticketmaster API: SDK for .NET

GitHub license

The Ticketmaster .NET SDK contains projects with the implementation of easy access to API endpoints. For more detailed information about the API and to get your API key head here. This SDK supports Discovery v2.

Important

Hi everyone, please, left a feedback about this project or about components. It will help me to improve this library. You can do this in any way you like:

  • Send me email.
  • Write to me in Skype.
  • Contact me in Linkedin.

Details you can find in 'Authors' section below.

Overview

The solution contains different projects

Usage

Setup IClientConfig

The implementation of interfaces, the clients, in sdk required to resolve ClientConfig and pass them like a parameter into constructor. It have ConsumerKey property what is the Consumer Key for ticketmaster api. And ApiRootUrl what should be https://app.ticketmaster.com/discovery/.

    public interface IClientConfig
    {
        string ConsumerKey { get; }
        string ApiRootUrl { get; }
    }

Simple usage of EventsClient

  var config = Substitute.For<IClientConfig>();
  config.ConsumerKey.Returns("K1uJLzJ5mdt3oBKNSzjcEEEzxHuJJXiX-1");
  config.ApiRootUrl.Returns("https://app.ticketmaster.com/discovery/");

  var restClient = new RestClient(config.ApiRootUrl);

  var eventsApiClient = new EventsClient(client, config);
  var result = await _sut.SearchEventsAsync(new SearchEventsRequest());

The requests classes and BaseQuery class.

The Discovery API can accept query parameters for different endpoints. To allow pass this query parameters was created BaseQuery which have QueryParameters property.

For adding this parameters you just need create new instance of IDiscoveryApiRequest, IDiscoveryApiGetRequest interface. In this solution we have implementations for this interfaces. The SearchAttractionsRequest, SearchClassificationsRequest, SearchEventsRequest, SearchVenuesRequest classes. Use method AddQueryParameter to add query properties, the rules described in Method description for Api. The Example for Search Events method is:

var request = new SearchAttractionsRequest();
request.AddQueryParameter(QueryParameters paremeter, string value);

Authors

See also the list of contributors who participated in this project.

Our Team

License

This project is licensed under the MIT License - see the LICENSE.md file for details

You can’t perform that action at this time.