Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 

Ticketmaster Open API Wrapper for .NET

GitHub license

Legal notice

Code & Opinions expressed in this repository are solely my own and do not express the views or opinions of my employer. This code is not supported by any employer as well as not profitable and do not bring any financial benefits. All work that was done during its creation was conducted in my spare/personal time and based only on my willingness to help the open-source community.

About

The Ticketmaster Open API Wrapper 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 Open API Wrapper 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

About

Ticketmaster Open API Wrapper for .NET

Resources

License

Releases

No releases published

Packages

No packages published

Languages