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

podio-community / podio-php / 5913140543

pending completion
5913140543

Pull #242

github

web-flow
Merge 3f09d5988 into 51d68f28d
Pull Request #242: More fixes

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

1149 of 2094 relevant lines covered (54.87%)

8.61 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($attributes = array())
8
    {
9
        parent::__construct();
×
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(PodioClient $podio_client, $ref_type, $ref_id, $rating_type, $user_id)
21
    {
22
        return self::member($podio_client->get("/rating/{$ref_type}/{$ref_id}/{$rating_type}/{$user_id}"));
×
23
    }
24

25
    /**
26
     * @see https://developers.podio.com/doc/ratings/get-ratings-22375
27
     */
28
    public static function get_for_type(PodioClient $podio_client, $ref_type, $ref_id, $rating_type)
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(PodioClient $podio_client, $ref_type, $ref_id)
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(PodioClient $podio_client, $ref_type, $ref_id, $rating_type)
45
    {
46
        return self::member($podio_client->get("/rating/{$ref_type}/{$ref_id}/{$rating_type}/self"));
×
47
    }
48

49
    /**
50
     * @see https://developers.podio.com/doc/ratings/add-rating-22377
51
     */
52
    public static function create(PodioClient $podio_client, $ref_type, $ref_id, $rating_type, $attributes = array())
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(PodioClient $podio_client, $ref_type, $ref_id, $rating_type)
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