forked from paneedesign/php-firebase-cloud-messaging
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClientInterface.php
More file actions
65 lines (55 loc) · 1.54 KB
/
Copy pathClientInterface.php
File metadata and controls
65 lines (55 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php
namespace PaneeDesign\PhpFirebaseCloudMessaging;
use GuzzleHttp;
/**
* @author Fabiano Roberto <fabiano@paneedesign.com>
*/
interface ClientInterface
{
/**
* Inject GuzzleHttp Client
* @param GuzzleHttp\ClientInterface $client
*/
public function injectGuzzleHttpClient(GuzzleHttp\ClientInterface $client);
/**
* Add your server api key here
* read how to obtain an api key here: https://firebase.google.com/docs/server/setup#prerequisites
*
* @param string $apiKey
*
* @return Client
*/
function setApiKey($apiKey);
/**
* People can overwrite the api url with a proxy server url of their own
*
* @param string $url
*
* @return Client
*/
function setProxyApiUrl($url);
/**
* sends your notification to the google servers and returns a guzzle response object
* containing their answer.
*
* @param Message $message
*
* @return \Psr\Http\Message\ResponseInterface
* @throws \GuzzleHttp\Exception\RequestException
*/
function send(Message $message);
/**
* @param integer $topic_id
* @param array|string $recipientsTokens
*
* @return \Psr\Http\Message\ResponseInterface
*/
public function addTopicSubscription($topic_id, $recipientsTokens);
/**
* @param integer $topic_id
* @param array|string $recipientsTokens
*
* @return \Psr\Http\Message\ResponseInterface
*/
public function removeTopicSubscription($topic_id, $recipientsTokens);
}