• 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

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