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

podio-community / podio-php / 5155068956

pending completion
5155068956

push

github

daniel-sc
feat: isolated client class to allow for parallel usage + extension + mocking

BREAKING CHANGE: replace static Podio with instantiable PodioClient

648 of 648 new or added lines in 66 files covered. (100.0%)

917 of 2107 relevant lines covered (43.52%)

24.12 hits per line

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

0.0
/models/PodioRating.php
1
<?php
2
/**
3
 * @see https://developers.podio.com/doc/ratings
4
 */
5
class PodioRating extends PodioObject
6
{
7
    public function __construct(PodioClient $podio_client, $attributes = array())
8
    {
9
        parent::__construct($podio_client);
×
10
        $this->property('rating_id', 'integer', array('id' => true));
×
11
        $this->property('type', 'string');
×
12
        $this->property('value', 'string');
×
13

14
        $this->init($attributes);
×
15
    }
16

17
    /**
18
     * @see https://developers.podio.com/doc/ratings/get-rating-22407
19
     */
20
    public static function get_for_type_and_user($ref_type, $ref_id, $rating_type, $user_id, PodioClient $podio_client)
21
    {
22
        return self::member($podio_client->get("/rating/{$ref_type}/{$ref_id}/{$rating_type}/{$user_id}"), $podio_client);
×
23
    }
24

25
    /**
26
     * @see https://developers.podio.com/doc/ratings/get-ratings-22375
27
     */
28
    public static function get_for_type($ref_type, $ref_id, $rating_type, PodioClient $podio_client)
29
    {
30
        return $podio_client->get("/rating/{$ref_type}/{$ref_id}/{$rating_type}")->json_body();
×
31
    }
32

33
    /**
34
     * @see https://developers.podio.com/doc/ratings/get-all-ratings-22376
35
     */
36
    public static function get_for($ref_type, $ref_id, PodioClient $podio_client)
37
    {
38
        return $podio_client->get("/rating/{$ref_type}/{$ref_id}")->json_body();
×
39
    }
40

41
    /**
42
     * @see https://developers.podio.com/doc/ratings/get-rating-own-84128
43
     */
44
    public static function get_own_for_type($ref_type, $ref_id, $rating_type, PodioClient $podio_client)
45
    {
46
        return self::member($podio_client->get("/rating/{$ref_type}/{$ref_id}/{$rating_type}/self"), $podio_client);
×
47
    }
48

49
    /**
50
     * @see https://developers.podio.com/doc/ratings/add-rating-22377
51
     */
52
    public static function create($ref_type, $ref_id, $rating_type, $attributes = array(), PodioClient $podio_client)
53
    {
54
        return $podio_client->post("/rating/{$ref_type}/{$ref_id}/{$rating_type}", $attributes);
×
55
    }
56

57
    /**
58
     * @see https://developers.podio.com/doc/ratings/remove-rating-22342
59
     */
60
    public static function delete($ref_type, $ref_id, $rating_type, PodioClient $podio_client)
61
    {
62
        return $podio_client->delete("/rating/{$ref_type}/{$ref_id}/{$rating_type}");
×
63
    }
64
}
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