• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

podio-community / podio-php / 5883458979

16 Aug 2023 08:19PM UTC coverage: 47.564% (-5.9%) from 53.497%
5883458979

Pull #242

github

web-flow
Merge 89cf31048 into 51d68f28d
Pull Request #242: More fixes

181 of 181 new or added lines in 43 files covered. (100.0%)

996 of 2094 relevant lines covered (47.56%)

33.35 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/models/PodioSpace.php
1
<?php
2
/**
3
 * @see https://developers.podio.com/doc/spaces
4
 */
5
class PodioSpace extends PodioObject
6
{
7
    public function __construct($attributes = array())
8
    {
9
        parent::__construct();
×
10
        $this->property('space_id', 'integer', array('id' => true));
×
11
        $this->property('name', 'string');
×
12
        $this->property('url', 'string');
×
13
        $this->property('url_label', 'string');
×
14
        $this->property('org_id', 'integer');
×
15
        $this->property('contact_count', 'integer');
×
16
        $this->property('members', 'integer');
×
17
        $this->property('role', 'string');
×
18
        $this->property('rights', 'array');
×
19
        $this->property('post_on_new_app', 'boolean');
×
20
        $this->property('post_on_new_member', 'boolean');
×
21
        $this->property('subscribed', 'boolean');
×
22
        $this->property('privacy', 'string');
×
23
        $this->property('auto_join', 'boolean');
×
24
        $this->property('type', 'string');
×
25
        $this->property('premium', 'boolean');
×
26
        $this->property('description', 'string');
×
27

28
        $this->property('created_on', 'datetime');
×
29
        $this->property('last_activity_on', 'datetime');
×
30

31
        $this->has_one('created_by', 'ByLine');
×
32
        $this->has_one('org', 'Organization');
×
33

34
        $this->init($attributes);
×
35
    }
36

37
    /**
38
     * @see https://developers.podio.com/doc/spaces/get-space-22389
39
     */
40
    public static function get(PodioClient $podio_client, $space_id)
41
    {
42
        return self::member($podio_client->get("/space/{$space_id}"));
×
43
    }
44

45
    /**
46
     * @see https://developers.podio.com/doc/organizations/get-spaces-on-organization-22387
47
     */
48
    public static function get_for_org(PodioClient $podio_client, $org_id)
49
    {
50
        return self::listing($podio_client->get("/org/{$org_id}/space/"));
×
51
    }
52

53
    /**
54
     * @see https://developers.podio.com/doc/spaces/get-space-by-url-22481
55
     */
56
    public static function get_for_url(PodioClient $podio_client, $attributes = array())
57
    {
58
        return self::member($podio_client->get("/space/url", $attributes));
×
59
    }
60

61
    /**
62
     * @see https://developers.podio.com/doc/spaces/get-available-spaces-1911961
63
     */
64
    public static function get_available(PodioClient $podio_client, $org_id)
65
    {
66
        return self::listing($podio_client->get("/space/org/{$org_id}/available/"));
×
67
    }
68

69
    /**
70
     * @see https://developers.podio.com/doc/spaces/get-top-spaces-22477
71
     */
72
    public static function get_top(PodioClient $podio_client, $attributes = array())
73
    {
74
        return self::listing($podio_client->get("/space/top/", $attributes));
×
75
    }
76

77
    /**
78
     * @see https://developers.podio.com/doc/spaces/create-space-22390
79
     */
80
    public static function create(PodioClient $podio_client, $attributes = array())
81
    {
82
        return $podio_client->post("/space/", $attributes)->json_body();
×
83
    }
84

85
    /**
86
     * @see https://developers.podio.com/doc/spaces/update-space-22391
87
     */
88
    public static function update(PodioClient $podio_client, $space_id, $attributes = array())
89
    {
90
        return $podio_client->put("/space/{$space_id}", $attributes);
×
91
    }
92

93
    /**
94
     * @see https://developers.podio.com/doc/spaces/delete-space-22417
95
     */
96
    public static function delete(PodioClient $podio_client, $space_id, $attributes = array())
97
    {
98
        return $podio_client->delete("/space/{$space_id}");
×
99
    }
100
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc