Completed
Pull Request — master (#478)
by
unknown
02:35
created

FitBit::getAccessTokenEndpoint()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace OAuth\OAuth1\Service;
4
5
use OAuth\OAuth1\Signature\SignatureInterface;
6
use OAuth\Common\Http\Uri\Uri;
7
use OAuth\Common\Consumer\CredentialsInterface;
8
use OAuth\Common\Http\Uri\UriInterface;
9
use OAuth\Common\Storage\TokenStorageInterface;
10
use OAuth\Common\Http\Client\ClientInterface;
11
12
class FitBit extends AbstractService
13
{
14
    public function __construct(
15
        CredentialsInterface $credentials,
16
        ClientInterface $httpClient,
17
        TokenStorageInterface $storage,
18
        SignatureInterface $signature,
19
        UriInterface $baseApiUri = null
20
    ) {
21
        parent::__construct($credentials, $httpClient, $storage, $signature, $baseApiUri);
22
23
        if (null === $baseApiUri) {
24
            $this->baseApiUri = new Uri('https://api.fitbit.com/1/');
25
        }
26
    }
27
28
    /**
29
     * {@inheritdoc}
30
     */
31
    public function getRequestTokenEndpoint()
32
    {
33
        return new Uri('https://api.fitbit.com/oauth/request_token');
34
    }
35
36
    /**
37
     * {@inheritdoc}
38
     */
39
    public function getAuthorizationEndpoint()
40
    {
41
        return new Uri('https://www.fitbit.com/oauth/authorize');
42
    }
43
44
    /**
45
     * {@inheritdoc}
46
     */
47
    public function getAccessTokenEndpoint()
48
    {
49
        return new Uri('https://api.fitbit.com/oauth/access_token');
50
    }
51
    
52
}
53