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

podio-community / podio-php / 5730982429

pending completion
5730982429

push

github

web-flow
Merge pull request #233 from podio-community/232-improvements-beta

fix: make podio_client first parameter of functions + remove podio_client member from models

235 of 235 new or added lines in 67 files covered. (100.0%)

916 of 2104 relevant lines covered (43.54%)

32.17 hits per line

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

0.0
/models/PodioHook.php
1
<?php
2
/**
3
 * @see https://developers.podio.com/doc/hooks
4
 */
5
class PodioHook extends PodioObject
6
{
7
    public function __construct($attributes = array())
8
    {
9
        parent::__construct();
×
10
        $this->property('hook_id', 'integer', array('id' => true));
×
11
        $this->property('status', 'string');
×
12
        $this->property('type', 'string');
×
13
        $this->property('url', 'string');
×
14
        $this->property('created_on', 'datetime');
×
15

16
        $this->has_one('created_by', 'ByLine');
×
17
        $this->has_one('created_via', 'Via');
×
18

19
        $this->init($attributes);
×
20
    }
21

22
    /**
23
     * @see https://developers.podio.com/doc/hooks/get-hooks-215285
24
     */
25
    public static function get_for(PodioClient $podio_client, $ref_type, $ref_id)
26
    {
27
        return self::listing($podio_client, $podio_client->get("/hook/{$ref_type}/{$ref_id}/"));
×
28
    }
29

30
    /**
31
     * @see https://developers.podio.com/doc/hooks/create-hook-215056
32
     */
33
    public static function create(PodioClient $podio_client, $ref_type, $ref_id, $attributes = array())
34
    {
35
        $body = $podio_client->post("/hook/{$ref_type}/{$ref_id}/", $attributes)->json_body();
×
36
        return $body['hook_id'];
×
37
    }
38

39
    /**
40
     * @see https://developers.podio.com/doc/hooks/request-hook-verification-215232
41
     */
42
    public static function verify(PodioClient $podio_client, $hook_id)
43
    {
44
        return $podio_client->post("/hook/{$hook_id}/verify/request")->json_body();
×
45
    }
46

47
    /**
48
     * @see https://developers.podio.com/doc/hooks/validate-hook-verification-215241
49
     */
50
    public static function validate(PodioClient $podio_client, $hook_id, $attributes = array())
51
    {
52
        return $podio_client->post("/hook/{$hook_id}/verify/validate", $attributes)->json_body();
×
53
    }
54

55
    /**
56
     * @see https://developers.podio.com/doc/hooks/delete-hook-215291
57
     */
58
    public static function delete(PodioClient $podio_client, $hook_id)
59
    {
60
        return $podio_client->delete("/hook/{$hook_id}");
×
61
    }
62
}
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