Class: Podio::Notification

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

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



27
28
29
# File 'lib/podio/models/notification.rb', line 27

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

.mark_all_as_viewedObject



35
36
37
# File 'lib/podio/models/notification.rb', line 35

def mark_all_as_viewed
  Podio.connection.post("/notification/viewed").status
end

.mark_as_viewed(id) ⇒ Object



31
32
33
# File 'lib/podio/models/notification.rb', line 31

def mark_as_viewed(id)
  Podio.connection.post("/notification/#{id}/viewed").status
end

.star(id) ⇒ Object



39
40
41
# File 'lib/podio/models/notification.rb', line 39

def star(id)
  Podio.connection.post("/notification/#{id}/star").status
end

.unstar(id) ⇒ Object



43
44
45
# File 'lib/podio/models/notification.rb', line 43

def unstar(id)
  Podio.connection.delete("/notification/#{id}/star").status
end