From b53a604c8897a25d9c6286b08006c250c778a120 Mon Sep 17 00:00:00 2001 From: Eric Stern Date: Mon, 22 Jul 2024 15:07:28 -0700 Subject: [PATCH] Expose makeApiCall for APIs that don't yet have native support --- src/Client.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Client.php b/src/Client.php index aeb519e..99065db 100644 --- a/src/Client.php +++ b/src/Client.php @@ -98,10 +98,14 @@ public function attachRegistration(string $regToken, array $user): Credential } /** + * @internal This method is made public for cases where APIs do not have + * native SDK support, but is NOT considered part of the public, stable + * API and is not subject to SemVer. + * * @param mixed[] $params * @return mixed[] */ - private function makeApiCall(string $route, array $params): array + public function makeApiCall(string $route, array $params): array { // TODO: PSR-xx $json = json_encode($params, JSON_THROW_ON_ERROR); @@ -110,7 +114,6 @@ private function makeApiCall(string $route, array $params): array CURLOPT_URL => sprintf('%s%s', $this->apiHost, $route), CURLOPT_POST => 1, CURLOPT_POSTFIELDS => $json, - // CURLOPT_VERBOSE => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => [ 'Authorization: Basic ' . base64_encode(':' . $this->secretKey),