Skip to content

Commit

Permalink
feat: add push providers (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdeme authored Mar 24, 2022
1 parent dc67d75 commit d39c770
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions lib/GetStream/StreamChat/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -1159,4 +1159,28 @@ public function sendUserCustomEvent(string $userId, array $event): StreamRespons
{
return $this->post("users/{$userId}/event", ["event" => $event]);
}

/** @link https://getstream.io/chat/docs/php/push_introduction/?language=php
* @throws StreamException
*/
public function upsertPushProvider(array $pushProvider): StreamResponse
{
return $this->post("push_providers", ["push_provider" => $pushProvider]);
}

/** @link https://getstream.io/chat/docs/php/push_introduction/?language=php
* @throws StreamException
*/
public function deletePushProvider(string $type, string $name): StreamResponse
{
return $this->delete("push_providers/{$type}/{$name}");
}

/** @link https://getstream.io/chat/docs/php/push_introduction/?language=php
* @throws StreamException
*/
public function listPushProviders(): StreamResponse
{
return $this->get("push_providers");
}
}

0 comments on commit d39c770

Please sign in to comment.