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

podio-community / podio-php / 5625582238

pending completion
5625582238

push

github

daniel-sc
fix: make podio_client first parameter of functions

resolves #232

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/PodioWidget.php
1
<?php
2
/**
3
 * @see https://developers.podio.com/doc/widgets
4
 */
5
class PodioWidget extends PodioObject
6
{
7
    public function __construct(PodioClient $podio_client, $attributes = array())
8
    {
9
        parent::__construct($podio_client);
×
10
        $this->property('widget_id', 'integer', array('id' => true));
×
11
        $this->property('type', 'string');
×
12
        $this->property('title', 'string');
×
13
        $this->property('config', 'hash');
×
14
        $this->property('rights', 'array');
×
15
        $this->property('data', 'hash'); // Only for get_for() method
×
16

17
        $this->has_one('created_by', 'ByLine');
×
18
        $this->property('created_on', 'datetime');
×
19
        $this->has_one('ref', 'Reference');
×
20

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

24
    /**
25
     * @see https://developers.podio.com/doc/widgets/create-widget-22491
26
     */
27
    public static function create(PodioClient $podio_client, $ref_type, $ref_id, $attributes = array())
28
    {
29
        return self::member($podio_client, $podio_client->post("/widget/{$ref_type}/{$ref_id}/", $attributes));
×
30
    }
31

32
    /**
33
     * @see https://developers.podio.com/doc/widgets/delete-widget-22492
34
     */
35
    public static function delete(PodioClient $podio_client, $widget_id)
36
    {
37
        return $podio_client->delete("/widget/{$widget_id}");
×
38
    }
39

40
    /**
41
     * @see https://developers.podio.com/doc/widgets/get-widget-22489
42
     */
43
    public static function get(PodioClient $podio_client, $widget_id)
44
    {
45
        return self::member($podio_client, $podio_client->get("/widget/{$widget_id}"));
×
46
    }
47

48
    /**
49
     * @see https://developers.podio.com/doc/widgets/get-widgets-22494
50
     */
51
    public static function get_for(PodioClient $podio_client, $ref_type, $ref_id)
52
    {
53
        return self::listing($podio_client, $podio_client->get("/widget/{$ref_type}/{$ref_id}/"));
×
54
    }
55

56
    /**
57
     * @see https://developers.podio.com/doc/widgets/update-widget-22490
58
     */
59
    public static function update(PodioClient $podio_client, $widget_id, $attributes = array())
60
    {
61
        return $podio_client->put("/widget/{$widget_id}", $attributes);
×
62
    }
63

64
    /**
65
     * @see https://developers.podio.com/doc/widgets/update-widget-order-22495
66
     */
67
    public static function update_order(PodioClient $podio_client, $ref_type, $ref_id, $attributes = array())
68
    {
69
        return $podio_client->put("/widget/{$ref_type}/{$ref_id}/order", $attributes);
×
70
    }
71
}
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