Class: Podio::NotificationGroup

Inherits:
ActivePodio::Base show all
Defined in:
lib/podio/models/notification_group.rb

Overview

This class wraps the response from the Get Notifications API call

Instance Attribute Summary

Attributes inherited from ActivePodio::Base

#attributes, #error_code, #error_message, #error_parameters, #error_propagate

Class Method Summary collapse

Methods inherited from ActivePodio::Base

#==, #[], #[]=, #api_friendly_ref_type, #as_json, collection, delegate_to_hash, handle_api_errors_for, has_many, has_one, #hash, #initialize, list, member, #new_record?, #persisted?, property, #to_param

Constructor Details

This class inherits a constructor from ActivePodio::Base

Class Method Details

.find(id) ⇒ Object



14
15
16
# File 'lib/podio/models/notification_group.rb', line 14

def find(id)
  member Podio.connection.get("/notification/#{id}/v2").body
end

.find_all(options = {}) ⇒ Object



8
9
10
11
12
# File 'lib/podio/models/notification_group.rb', line 8

def find_all(options={})
  list Podio.connection.get { |req|
    req.url('/notification/', options)
  }.body
end

.mark_as_viewed_by_ref(ref_type, ref_id) ⇒ Object



19
20
21
# File 'lib/podio/models/notification_group.rb', line 19

def mark_as_viewed_by_ref(ref_type, ref_id)
  Podio.connection.post("/notification/#{ref_type}/#{ref_id}/viewed").status
end