From 8eeae1318723a3a93f00d26eeb4c3517003360ad Mon Sep 17 00:00:00 2001 From: Luca Haid Date: Tue, 4 Feb 2025 19:56:33 +0100 Subject: [PATCH] Added SNOPP API Library --- lib/SNOPP/SNOPP.php | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 lib/SNOPP/SNOPP.php diff --git a/lib/SNOPP/SNOPP.php b/lib/SNOPP/SNOPP.php new file mode 100644 index 000000000..d995ea3e5 --- /dev/null +++ b/lib/SNOPP/SNOPP.php @@ -0,0 +1,36 @@ + [ + 'method' => 'GET', + 'header' => "X-Api-Key: $SNOPP_API_KEY\r\n", + ] + ]; + + $snopp_output = file_get_contents("$SNOPP_API_URL/ticket/find?provider_id=all&status=open", false, stream_context_create($ctx_opts)); + $ticket_obj = json_decode($snopp_output); + $tickets = $ticket_obj->result->tickets; + + return $tickets; + } + +} +?>