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

podio-community / podio-php / 5937884423

22 Aug 2023 11:00AM UTC coverage: 55.065% (+1.6%) from 53.497%
5937884423

push

github

web-flow
Merge pull request #242 from podio-community/more-fixes

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

1147 of 2083 relevant lines covered (55.06%)

34.62 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();
4✔
10
        $this->property('integration_id', 'integer', array('id' => true));
4✔
11
        $this->property('app_id', 'integer');
4✔
12
        $this->property('status', 'string');
4✔
13
        $this->property('type', 'string');
4✔
14
        $this->property('silent', 'boolean');
4✔
15
        $this->property('config', 'hash');
4✔
16
        $this->property('mapping', 'hash');
4✔
17
        $this->property('updating', 'boolean');
4✔
18
        $this->property('last_updated_on', 'datetime');
4✔
19
        $this->property('created_on', 'datetime');
4✔
20

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

23
        $this->init($attributes);
4✔
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->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