Completed
Pull Request — master (#36)
by
unknown
08:41
created

Organization   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 56
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 50%

Importance

Changes 2
Bugs 0 Features 1
Metric Value
wmc 2
c 2
b 0
f 1
lcom 1
cbo 2
dl 0
loc 56
ccs 2
cts 4
cp 0.5
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A show() 0 4 1
A boards() 0 4 1
1
<?php
2
3
namespace Trello\Api;
4
5
/**
6
 * Trello Organization API
7
 * @link https://trello.com/docs/api/organization
8
 *
9
 * Not implemented.
10
 */
11
class Organization extends AbstractApi
12
{
13
    /**
14
     * Base path of organizations api
15
     * @var string
16
     */
17
    protected $path = 'organizations';
18
19
    /**
20
     * Organization fields
21
     * @link https://trello.com/docs/api/organization/#get-1-organizations-idorg-or-name-field
22
     * @var array
23
     */
24
    public static $fields = array(
25
        'name',
26
        'displayName',
27
        'desc',
28
        'descData',
29
        'idBoards',
30
        'invited',
31
        'invitations',
32
        'memberships',
33
        'prefs',
34
        'powerUps',
35
        'products',
36
        'billableMemberCount',
37
        'url',
38
        'website',
39
        'logoHash',
40
        'premiumFeatures'
41
    );
42
43
    /**
44
     * Find an organization by id
45
     * @link https://trello.com/docs/api/organization/#get-1-organizations-idorg-or-name
46
     *
47
     * @param string $id     the organization's id
48
     * @param array  $params optional attributes
49
     *
50
     * @return array
51
     */
52 1
    public function show($id, array $params = array())
53
    {
54 1
        return $this->get($this->getPath().'/'.rawurlencode($id), $params);
55
    }
56
57
    /**
58
     * Boards API
59
     *
60
     * @return Organization\Boards
61
     */
62
    public function boards()
63
    {
64
        return new Organization\Boards($this->client);
65
    }
66
}
67