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

FiveHundredPx   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 3
Bugs 1 Features 1
Metric Value
wmc 5
c 3
b 1
f 1
lcom 0
cbo 2
dl 0
loc 47
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 19 2
A getRequestTokenEndpoint() 0 4 1
A getAuthorizationEndpoint() 0 4 1
A getAccessTokenEndpoint() 0 4 1
1
<?php
2
/**
3
 * 500px service.
4
 *
5
 * @author  Pedro Amorim <[email protected]>
6
 * @license http://www.opensource.org/licenses/mit-license.html MIT License
7
 * @link    https://developers.500px.com/
8
 */
9
10
namespace OAuth\OAuth1\Service;
11
12
use OAuth\OAuth1\Signature\SignatureInterface;
13
use OAuth\Common\Http\Uri\Uri;
14
use OAuth\Common\Consumer\CredentialsInterface;
15
use OAuth\Common\Http\Uri\UriInterface;
16
use OAuth\Common\Storage\TokenStorageInterface;
17
use OAuth\Common\Http\Client\ClientInterface;
18
19
/**
20
 * 500px service.
21
 *
22
 * @author  Pedro Amorim <[email protected]>
23
 * @license http://www.opensource.org/licenses/mit-license.html MIT License
24
 * @link    https://developers.500px.com/
25
 */
26
class FiveHundredPx extends AbstractService
27
{
28
    public function __construct(
29
        CredentialsInterface $credentials,
30
        ClientInterface $httpClient,
31
        TokenStorageInterface $storage,
32
        SignatureInterface $signature,
33
        UriInterface $baseApiUri = null
34
    ) {
35
        parent::__construct(
36
            $credentials,
37
            $httpClient,
38
            $storage,
39
            $signature,
40
            $baseApiUri
41
        );
42
43
        if (null === $baseApiUri) {
44
            $this->baseApiUri = new Uri('https://api.500px.com/v1/');
45
        }
46
    }
47
48
    /**
49
     * {@inheritDoc}
50
     */
51
    public function getRequestTokenEndpoint()
52
    {
53
        return new Uri('https://api.500px.com/v1/oauth/request_token');
54
    }
55
56
    /**
57
     * {@inheritdoc}
58
     */
59
    public function getAuthorizationEndpoint()
60
    {
61
        return new Uri('https://api.500px.com/v1/oauth/authorize');
62
    }
63
64
    /**
65
     * {@inheritdoc}
66
     */
67
    public function getAccessTokenEndpoint()
68
    {
69
        return new Uri('https://api.500px.com/v1/oauth/access_token');
70
    }
71
    
72
}
73