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

podio-community / podio-php / 5637886045

pending completion
5637886045

Pull #233

github

web-flow
Merge 4cab6a241 into b5bb41606
Pull Request #233: fix: make podio_client first parameter of functions

231 of 231 new or added lines in 64 files covered. (100.0%)

916 of 2104 relevant lines covered (43.54%)

24.12 hits per line

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

0.0
/models/PodioComment.php
1
<?php
2
/**
3
 * @see https://developers.podio.com/doc/comments
4
 */
5
class PodioComment extends PodioObject
6
{
7
    public function __construct($attributes = array())
8
    {
9
        parent::__construct();
×
10
        $this->property('comment_id', 'integer', array('id' => true));
×
11
        $this->property('value', 'string');
×
12
        $this->property('rich_value', 'string');
×
13
        $this->property('external_id', 'string');
×
14
        $this->property('space_id', 'integer');
×
15
        $this->property('created_on', 'datetime');
×
16
        $this->property('like_count', 'integer');
×
17
        $this->property('is_liked', 'boolean');
×
18

19
        $this->has_one('created_by', 'ByLine');
×
20
        $this->has_one('created_via', 'Via');
×
21
        $this->has_one('ref', 'Reference');
×
22

23
        $this->has_one('embed', 'Embed', array('json_value' => 'embed_id', 'json_target' => 'embed_id'));
×
24
        $this->has_one('embed_file', 'File', array('json_value' => 'file_id', 'json_target' => 'embed_file_id'));
×
25
        $this->has_many('files', 'File', array('json_value' => 'file_id', 'json_target' => 'file_ids'));
×
26
        $this->has_many('questions', 'Question');
×
27

28
        $this->init($attributes);
×
29
    }
30

31
    /**
32
     * @see https://developers.podio.com/doc/comments/get-a-comment-22345
33
     */
34
    public static function get(PodioClient $podio_client, $comment_id)
35
    {
36
        return self::member($podio_client, $podio_client->get("/comment/{$comment_id}"));
×
37
    }
38

39
    /**
40
     * @see https://developers.podio.com/doc/comments/get-comments-on-object-22371
41
     */
42
    public static function get_for(PodioClient $podio_client, $ref_type, $ref_id, $attributes = array())
43
    {
44
        return self::listing($podio_client, $podio_client->get("/comment/{$ref_type}/{$ref_id}/", $attributes));
×
45
    }
46

47
    /**
48
     * @see https://developers.podio.com/doc/comments/delete-a-comment-22347
49
     */
50
    public static function delete(PodioClient $podio_client, $comment_id)
51
    {
52
        return $podio_client->delete("/comment/{$comment_id}");
×
53
    }
54

55
    /**
56
     * @see https://developers.podio.com/doc/comments/add-comment-to-object-22340
57
     */
58
    public static function create(PodioClient $podio_client, $ref_type, $ref_id, $attributes = array(), $options = array())
59
    {
60
        $url = $podio_client->url_with_options("/comment/{$ref_type}/{$ref_id}", $options);
×
61
        $body = $podio_client->post($url, $attributes)->json_body();
×
62
        return $body['comment_id'];
×
63
    }
64

65
    /**
66
     * @see https://developers.podio.com/doc/comments/update-a-comment-22346
67
     */
68
    public static function update(PodioClient $podio_client, $comment_id, $attributes = array())
69
    {
70
        return $podio_client->put("/comment/{$comment_id}", $attributes);
×
71
    }
72
}
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