• 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/PodioNotification.php
1
<?php
2
/**
3
 * @see https://developers.podio.com/doc/notifications
4
 */
5
class PodioNotification extends PodioObject
6
{
7
    public function __construct($attributes = array())
8
    {
9
        parent::__construct();
×
10
        $this->property('notification_id', 'integer', array('id' => true));
×
11
        $this->property('type', 'string');
×
12
        $this->property('data', 'hash');
×
13
        $this->property('icon', 'string');
×
14
        $this->property('text', 'string');
×
15
        $this->property('viewed_on', 'datetime');
×
16
        $this->property('subscription_id', 'integer');
×
17
        $this->property('created_on', 'datetime');
×
18
        $this->property('starred', 'boolean');
×
19

20
        $this->has_one('created_by', 'ByLine');
×
21
        $this->has_one('created_via', 'Via');
×
22
        $this->has_one('user', 'User');
×
23

24
        $this->init($attributes);
×
25
    }
26

27
    /**
28
     * @see https://developers.podio.com/doc/notifications/get-inbox-new-count-84610
29
     */
30
    public static function get_new_count(PodioClient $podio_client)
31
    {
32
        $body = $podio_client->get("/notification/inbox/new/count")->json_body();
×
33
        return $body['new'];
×
34
    }
35

36
    /**
37
     * @see https://developers.podio.com/doc/notifications/mark-all-notifications-as-viewed-58099
38
     */
39
    public static function mark_all_as_viewed(PodioClient $podio_client)
40
    {
41
        return $podio_client->post("/notification/viewed");
×
42
    }
43

44
    /**
45
     * @see https://developers.podio.com/doc/notifications/mark-notification-as-viewed-22436
46
     */
47
    public static function mark_as_viewed(PodioClient $podio_client, $notification_id)
48
    {
49
        return $podio_client->post("/notification/{$notification_id}/viewed");
×
50
    }
51

52
    /**
53
     * @see https://developers.podio.com/doc/notifications/mark-notifications-as-viewed-by-ref-553653
54
     */
55
    public static function mark_as_viewed_for_ref(PodioClient $podio_client, $ref_type, $ref_id)
56
    {
57
        return $podio_client->post("/notification/{$ref_type}/{$ref_id}/viewed");
×
58
    }
59

60
    /**
61
     * @see https://developers.podio.com/doc/notifications/star-notification-295910
62
     */
63
    public static function star(PodioClient $podio_client, $notification_id)
64
    {
65
        return $podio_client->post("/notification/{$notification_id}/star");
×
66
    }
67

68
    /**
69
     * @see https://developers.podio.com/doc/notifications/un-star-notification-295911
70
     */
71
    public static function unstar(PodioClient $podio_client, $notification_id)
72
    {
73
        return $podio_client->delete("/notification/{$notification_id}/star");
×
74
    }
75
}
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