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

podio-community / podio-php / 5625598883

pending completion
5625598883

Pull #233

github

web-flow
Merge 617660f6f into b5bb41606
Pull Request #233: fix: make podio_client first parameter of functions

145 of 145 new or added lines in 40 files covered. (100.0%)

917 of 2108 relevant lines covered (43.5%)

24.11 hits per line

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

0.0
/models/PodioView.php
1
<?php
2
/**
3
 * @see https://developers.podio.com/doc/filters
4
 */
5
class PodioView extends PodioObject
6
{
7
    public function __construct(PodioClient $podio_client, $attributes = array())
8
    {
9
        parent::__construct($podio_client);
×
10
        $this->property('view_id', 'integer', array('id' => true));
×
11
        $this->property('name', 'string');
×
12
        $this->property('created_on', 'datetime');
×
13
        $this->property('items', 'integer');
×
14
        $this->property('sort_by', 'string');
×
15
        $this->property('sort_desc', 'string');
×
16
        $this->property('filters', 'hash');
×
17
        $this->property('layout', 'string');
×
18
        $this->property('fields', 'hash');
×
19

20
        $this->has_one('created_by', 'ByLine');
×
21

22
        $this->init($attributes);
×
23
    }
24

25
    /**
26
     * @see https://developers.podio.com/doc/views/create-view-27453
27
     */
28
    public static function create(PodioClient $podio_client, $app_id, $attributes = array())
29
    {
30
        $body = $podio_client->post("/view/app/{$app_id}/", $attributes)->json_body();
×
31
        return $body['view_id'];
×
32
    }
33

34
    /**
35
     * @see https://developers.podio.com/doc/views/get-view-27450
36
     */
37
    public static function get(PodioClient $podio_client, $view_id)
38
    {
39
        return self::member($podio_client, $podio_client->get("/view/{$view_id}"));
×
40
    }
41

42
    /**
43
     * @see https://developers.podio.com/doc/views/get-views-27460
44
     */
45
    public static function get_for_app(PodioClient $podio_client, $app_id)
46
    {
47
        return self::listing($podio_client, $podio_client->get("/view/app/{$app_id}/"));
×
48
    }
49

50
    /**
51
     * @see https://developers.podio.com/doc/views/get-last-view-27663
52
     */
53
    public static function get_last(PodioClient $podio_client, $app_id)
54
    {
55
        return self::member($podio_client, $podio_client->get("/view/app/{$app_id}/last"));
×
56
    }
57

58
    /**
59
     * @see https://developers.podio.com/doc/views/update-last-view-5988251
60
     */
61
    public static function update_last(PodioClient $podio_client, $app_id, $attributes = array())
62
    {
63
        return $podio_client->put("/view/app/{$app_id}/last", $attributes);
×
64
    }
65

66
    /**
67
     * @see https://developers.podio.com/doc/views/delete-view-27454
68
     */
69
    public static function delete(PodioClient $podio_client, $view_id)
70
    {
71
        return $podio_client->delete("/view/{$view_id}");
×
72
    }
73
}
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