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

podio-community / podio-php / 5637886045

pending completion
5637886045

Pull #233

github

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

231 of 231 new or added lines in 64 files covered. (100.0%)

916 of 2104 relevant lines covered (43.54%)

24.12 hits per line

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

68.42
/models/PodioIntegration.php
1
<?php
2
/**
3
 * @see https://developers.podio.com/doc/integrations
4
 */
5
class PodioIntegration extends PodioObject
6
{
7
    public function __construct($attributes = array())
8
    {
9
        parent::__construct();
3✔
10
        $this->property('integration_id', 'integer', array('id' => true));
3✔
11
        $this->property('app_id', 'integer');
3✔
12
        $this->property('status', 'string');
3✔
13
        $this->property('type', 'string');
3✔
14
        $this->property('silent', 'boolean');
3✔
15
        $this->property('config', 'hash');
3✔
16
        $this->property('mapping', 'hash');
3✔
17
        $this->property('updating', 'boolean');
3✔
18
        $this->property('last_updated_on', 'datetime');
3✔
19
        $this->property('created_on', 'datetime');
3✔
20

21
        $this->has_one('created_by', 'ByLine');
3✔
22

23
        $this->init($attributes);
3✔
24
    }
25

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

35
    /**
36
     * @see https://developers.podio.com/doc/integrations/get-integration-86821
37
     */
38
    public static function get(PodioClient $podio_client, $app_id)
39
    {
40
        return self::member($podio_client, $podio_client->get("/integration/{$app_id}"));
×
41
    }
42

43
    /**
44
     * @see https://developers.podio.com/doc/integrations/refresh-integration-86987
45
     */
46
    public static function refresh(PodioClient $podio_client, $app_id)
47
    {
48
        return $podio_client->post("/integration/{$app_id}/refresh");
×
49
    }
50

51
    /**
52
     * @see https://developers.podio.com/doc/integrations/update-integration-86843
53
     */
54
    public static function update(PodioClient $podio_client, $app_id, $attributes = array())
55
    {
56
        return $podio_client->put("/integration/{$app_id}", $attributes);
×
57
    }
58

59
    /**
60
     * @see https://developers.podio.com/doc/integrations/delete-integration-86876
61
     */
62
    public static function delete(PodioClient $podio_client, $app_id)
63
    {
64
        return $podio_client->delete("/integration/{$app_id}");
×
65
    }
66
}
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