Notification Setup Error

We have detected an error in your notification set-up (Event-ID dab39dc24f564ec7bd4628d1305fd03c). Currently, we cannot inform you about inspection progress. Please check that the user 557058:bca11929-8c2d-43f2-8a82-c5416880d395 still has access to your repository or update the API account.

Completed
Push — develop ( a60fd1...b17eb0 )
by Alexandru
02:01 queued 15s
created

Workspace::workspace()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
/**
4
 * This file is part of the bitbucket-api package.
5
 *
6
 * (c) Alexandru G. <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Bitbucket\API\Workspaces;
13
14
use Bitbucket\API;
15
use Psr\Http\Message\ResponseInterface;
16
17
/**
18
 * @author  Matt S.    <[email protected]>
19
 */
20
class Workspace extends API\Api
21
{
22
    /**
23
     * Get the public information associated with a workspace.
24
     *
25
     * @access public
26
     * @param  string           $workspace The workspace ID (slug) or workspace UUID in curly brackets.
27
     * @return ResponseInterface
28
     */
29
    public function workspace($workspace)
30
    {
31
        return $this->getClient()->setApiVersion('2.0')->get(
32
            sprintf('/workspaces/%s', $workspace)
33
        );
34
    }
35
36
    /**
37
     * Get the workspace members.
38
     *
39
     * @access public
40
     * @param  string           $workspace The workspace ID (slug) or workspace UUID in curly brackets.
41
     * @return ResponseInterface
42
     */
43
    public function members($workspace)
44
    {
45
        return $this->getClient()->setApiVersion('2.0')->get(
46
            sprintf('/workspaces/%s/members', $workspace)
47
        );
48
    }
49
50
    /**
51
     * Get the list of projects in the workspace
52
     *
53
     * @access public
54
     * @param  string           $workspace The workspace ID (slug) or workspace UUID in curly brackets.
55
     * @return ResponseInterface
56
     */
57
    public function projects($workspace)
58
    {
59
        return $this->getClient()->setApiVersion('2.0')->get(
60
            sprintf('/workspaces/%s/projects', $workspace)
61
        );
62
    }
63
64
    /**
65
     * @return Hooks
66
     * @throws \InvalidArgumentException
67
     */
68
    public function hooks()
69
    {
70
        return $this->api(Hooks::class);
71
    }
72
}
73