Giter Site home page Giter Site logo

konzertmeister's Introduction

Konzertmeister plugin for PHP

Installation

Install the package via composer:

composer require passchn/konzertmeister

Dependencies:

  • php ^8.1
  • guzzlehttp/guzzle ^7
  • nette/http ^3

Usage

// Copy the "Terminlisten-Link" with your filters (tags, types, ...) from this url:
// https://web.konzertmeister.app/export/list
// Note: Don't change the params as the hash will be invalid! 
$url = 'https://rest.konzertmeister.app/api/v3/org/OALS_4dad../upcomingappointments?types=1,2&limit=5&display=light&tags=22351,2024&hash=93af9...'

$guzzle = new GuzzleHttp\Client();
$options = new Passchn\Konzertmeister\Network\ClientOptions($guzzle, $url);

$client = new Passchn\Konzertmeister\Network\Client($options);

/** @var list<Passchn\Konzertmeister\Event\Event> **/
$events = $client->fetch();

If everything worked, $events will be an array of Passchn\Konzertmeister\Event\Event.

$event = current($events);
$eventName = $event->name;
$dateFrom = $event->start->format('d.m.Y');

echo "$eventName wird am $dateFrom stattfinden. Wir freuen uns auf Deinen Besuch!";

Contribution

Feel free to open a ticket or a pull request.

konzertmeister's People

Contributors

passchn avatar

Stargazers

kkneiphs avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.