Class: Podio::CalendarEvent
Instance Attribute Summary
#attributes, #error_code, #error_message, #error_parameters, #error_propagate
Class Method Summary
collapse
-
.find_all(options = {}) ⇒ Object
-
.find_all_for_app(app_id, options = {}) ⇒ Object
-
.find_all_for_space(space_id, options = {}) ⇒ Object
-
.find_personal_summary ⇒ Object
-
.find_summary(options = {}) ⇒ Object
-
.find_summary_for_org(org_id) ⇒ Object
-
.find_summary_for_space(space_id) ⇒ Object
-
.get_calendars_for_linked_acc(acc_id, options = {}) ⇒ Object
-
.get_global_exports ⇒ Object
-
.get_reference_exports(ref_type, ref_id) ⇒ Object
-
.set_global_export(linked_account_id, attributes = {}) ⇒ Object
-
.set_reference_export(linked_account_id, ref_type, ref_id, attributes = {}) ⇒ Object
-
.stop_global_export(linked_account_id) ⇒ Object
-
.stop_reference_export(linked_account_id, ref_type, ref_id) ⇒ Object
#==, #[], #[]=, #api_friendly_ref_type, #as_json, collection, delegate_to_hash, handle_api_errors_for, has_many, has_one, #hash, #initialize, #initialize_attributes, list, member, #new_record?, output_attribute_as_json, #persisted?, property, #to_param
Class Method Details
.find_all(options = {}) ⇒ Object
19
20
21
22
23
|
# File 'lib/podio/models/calendar_event.rb', line 19
def find_all(options = {})
list Podio.connection.get { |req|
req.url('/calendar/', options)
}.body
end
|
.find_all_for_app(app_id, options = {}) ⇒ Object
31
32
33
34
35
|
# File 'lib/podio/models/calendar_event.rb', line 31
def find_all_for_app(app_id, options={})
list Podio.connection.get { |req|
req.url("/calendar/app/#{app_id}/", options)
}.body
end
|
.find_all_for_space(space_id, options = {}) ⇒ Object
25
26
27
28
29
|
# File 'lib/podio/models/calendar_event.rb', line 25
def find_all_for_space(space_id, options={})
list Podio.connection.get { |req|
req.url("/calendar/space/#{space_id}/", options)
}.body
end
|
.find_personal_summary ⇒ Object
66
67
68
69
70
71
|
# File 'lib/podio/models/calendar_event.rb', line 66
def find_personal_summary
response = Podio.connection.get("/calendar/personal/summary").body
response['today']['events'] = list(response['today']['events'])
response['upcoming']['events'] = list(response['upcoming']['events'])
response
end
|
.find_summary(options = {}) ⇒ Object
43
44
45
46
47
48
49
50
|
# File 'lib/podio/models/calendar_event.rb', line 43
def find_summary(options = {})
response = Podio.connection.get do |req|
req.url("/calendar/summary", options)
end.body
response['today']['events'] = list(response['today']['events'])
response['upcoming']['events'] = list(response['upcoming']['events'])
response
end
|
.find_summary_for_org(org_id) ⇒ Object
59
60
61
62
63
64
|
# File 'lib/podio/models/calendar_event.rb', line 59
def find_summary_for_org(org_id)
response = Podio.connection.get("/calendar/org/#{org_id}/summary").body
response['today']['events'] = list(response['today']['events'])
response['upcoming']['events'] = list(response['upcoming']['events'])
response
end
|
.find_summary_for_space(space_id) ⇒ Object
52
53
54
55
56
57
|
# File 'lib/podio/models/calendar_event.rb', line 52
def find_summary_for_space(space_id)
response = Podio.connection.get("/calendar/space/#{space_id}/summary").body
response['today']['events'] = list(response['today']['events'])
response['upcoming']['events'] = list(response['upcoming']['events'])
response
end
|
.get_calendars_for_linked_acc(acc_id, options = {}) ⇒ Object
37
38
39
40
41
|
# File 'lib/podio/models/calendar_event.rb', line 37
def get_calendars_for_linked_acc(acc_id, options={})
list Podio.connection.get { |req|
req.url("/calendar/export/linked_account/#{acc_id}/available", options)
}.body
end
|
.get_global_exports ⇒ Object
99
100
101
102
103
|
# File 'lib/podio/models/calendar_event.rb', line 99
def get_global_exports()
list Podio.connection.get { |req|
req.url("/calendar/export/")
}.body
end
|
.get_reference_exports(ref_type, ref_id) ⇒ Object
81
82
83
84
85
|
# File 'lib/podio/models/calendar_event.rb', line 81
def get_reference_exports(ref_type, ref_id)
list Podio.connection.get { |req|
req.url("/calendar/export/#{ref_type}/#{ref_id}/")
}.body
end
|
.set_global_export(linked_account_id, attributes = {}) ⇒ Object
91
92
93
94
95
96
97
|
# File 'lib/podio/models/calendar_event.rb', line 91
def set_global_export(linked_account_id, attributes={})
response = Podio.connection.put do |req|
req.url "/calendar/export/linked_account/#{linked_account_id}"
req.body = attributes
end
response.status
end
|
.set_reference_export(linked_account_id, ref_type, ref_id, attributes = {}) ⇒ Object
73
74
75
76
77
78
79
|
# File 'lib/podio/models/calendar_event.rb', line 73
def set_reference_export(linked_account_id, ref_type, ref_id, attributes={})
response = Podio.connection.put do |req|
req.url "/calendar/export/linked_account/#{linked_account_id}/#{ref_type}/#{ref_id}"
req.body = attributes
end
response.status
end
|
.stop_global_export(linked_account_id) ⇒ Object
105
106
107
|
# File 'lib/podio/models/calendar_event.rb', line 105
def stop_global_export(linked_account_id)
Podio.connection.delete("/calendar/export/linked_account/#{linked_account_id}").status
end
|
.stop_reference_export(linked_account_id, ref_type, ref_id) ⇒ Object
87
88
89
|
# File 'lib/podio/models/calendar_event.rb', line 87
def stop_reference_export(linked_account_id, ref_type, ref_id)
Podio.connection.delete("/calendar/export/linked_account/#{linked_account_id}/#{ref_type}/#{ref_id}").status
end
|