Completed
Pull Request — master (#36)
by
unknown
09:03
created

Organization::boards()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 0
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
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
     * Organization Boards API
59
     *
60
     * @return Organization\Boards
61
     */
62
    public function boards()
63
    {
64
        return new Organization\Boards($this->client);
65
    }
66
67
    /**
68
     * Organization Members API
69
     *
70
     * @return Organization\Members
71
     */
72
    public function members()
73
    {
74
        return new Organization\Members($this->client);
75
    }
76
}
77