Skip to content

Latest commit

 

History

History
59 lines (44 loc) · 2.38 KB

README.md

File metadata and controls

59 lines (44 loc) · 2.38 KB

Kinoheld API Client

Build status master Build status dev NuGet version

Description

Kinoheld API Client is a client for the GraphQL-API, which is provided by kinoheld.de. The client currently supports:

  • Searching a cinema by giving a city, a search term and a maximum distance between the city and the cinema.
  • Retrieving information for movies that are currently played / will be played at the given cinema.
  • Searching for city by giving a searchterm (e.g. a postal code)

Please bear in mind kinoheld.de only lists cinemas that are Germany.

Basis usage:

Search for a cinema

// Get all cinemas that are near the city "Aurich"
var client = new KinoheldClient();
var cinemas = await client.GetCinemas("aurich");

// Search for cinemas near Aurich that contain the term 'autokino'
var client = new KinoheldClient();
var cinemas = await client.GetCinemas("aurich", "autokino");

Retrieve information about upcoming movies

// Retrieve all movies, that will be played tommorow
var client = new KinoheldClient();
var upcoming = await client.GetShows(cinema.Id, DateTime.Today.AddDays(1));   

Dynamic queries

You can use dynamic queries to only get back the information you need. That way you can save transmission overhead.

//Retrieve only ID and Name of all cinemas near the City "Aurich"
IKinoheldClient client = new KinoheldClient();
var dynamicQuery = GetCinemasDynamicQuery.Id | GetCinemasDynamicQuery.Name;
var cinemas = await client.GetCinemas("aurich", dynamicQuery: dynamicQuery);

Cancellation

The client currently supports basic cancellation.

var cts = new CancellationTokenSource();
IKinoheldClient client = new KinoheldClient();
var cinemas = await client.GetCinemas("aurich", cancellationToken: cts.Token);
// ...
cts.Cancel();