Class: Podio::Notification

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

Overview

Instance Attribute Summary

Attributes inherited from ActivePodio::Base

#attributes

Class Method Summary collapse

Methods inherited from ActivePodio::Base

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

Constructor Details

This class inherits a constructor from ActivePodio::Base

Class Method Details

.find(id) ⇒ Object



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

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

.mark_all_as_viewedObject



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

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

.mark_as_viewed(id) ⇒ Object



33
34
35
# File 'lib/podio/models/notification.rb', line 33

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

.mark_as_viewed_by_ref(type, id) ⇒ Object



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

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

.star(id) ⇒ Object



48
49
50
# File 'lib/podio/models/notification.rb', line 48

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

.unstar(id) ⇒ Object



53
54
55
# File 'lib/podio/models/notification.rb', line 53

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