Skip to content

A basic client implementation for the GraphQL API provided by Kinoheld.de

License

Notifications You must be signed in to change notification settings

janniksam/Kinoheld.Api.Client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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();

About

A basic client implementation for the GraphQL API provided by Kinoheld.de

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages