class Podio::CalendarEvent

@see developers.podio.com/doc/calendar

Public Class Methods

find_all(options = {}) click to toggle source

@see developers.podio.com/doc/calendar/get-global-calendar-22458

# File lib/podio/models/calendar_event.rb, line 28
def find_all(options = {})
  list Podio.connection.get { |req|
    req.url('/calendar/', options)
  }.body
end
find_all_for_app(app_id, options={}) click to toggle source

@see developers.podio.com/doc/calendar/get-app-calendar-22460

# File lib/podio/models/calendar_event.rb, line 48
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_linked_account(linked_account_id, options = {}) click to toggle source
# File lib/podio/models/calendar_event.rb, line 34
def find_all_for_linked_account(linked_account_id, options = {})
  list Podio.connection.get { |req|
    req.url("/calendar/linked_account/#{linked_account_id}/", options)
  }.body
end
find_all_for_space(space_id, options={}) click to toggle source

@see developers.podio.com/doc/calendar/get-space-calendar-22459

# File lib/podio/models/calendar_event.rb, line 41
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() click to toggle source

@see developers.podio.com/doc/calendar/get-calendar-summary-for-personal-1657903

# File lib/podio/models/calendar_event.rb, line 122
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 = {}) click to toggle source

@see developers.podio.com/doc/calendar/get-calendar-summary-1609256

# File lib/podio/models/calendar_event.rb, line 97
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) click to toggle source
# File lib/podio/models/calendar_event.rb, line 114
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) click to toggle source

@see developers.podio.com/doc/calendar/get-calendar-summary-for-space-1609328

# File lib/podio/models/calendar_event.rb, line 107
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={}) click to toggle source
# File lib/podio/models/calendar_event.rb, line 90
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() click to toggle source

@see developers.podio.com/doc/calendar/get-global-exports-7554169

# File lib/podio/models/calendar_event.rb, line 160
def get_global_exports()
  list Podio.connection.get { |req|
    req.url("/calendar/export/")
  }.body
end
get_reference_exports(ref_type, ref_id) click to toggle source

@see developers.podio.com/doc/calendar/get-exports-by-reference-7554180

# File lib/podio/models/calendar_event.rb, line 139
def get_reference_exports(ref_type, ref_id)
  list Podio.connection.get { |req|
    req.url("/calendar/export/#{ref_type}/#{ref_id}/")
  }.body
end
move_event(uid, attributes={}) click to toggle source

@see

# File lib/podio/models/calendar_event.rb, line 55
def move_event(uid, attributes={})
  response = Podio.connection.post do |req|
    req.url "/calendar/event/#{uid}/move"
    req.body = attributes
  end
  member response.body
end
move_event_external(linked_account_id, uid, attributes={}) click to toggle source

@see

# File lib/podio/models/calendar_event.rb, line 64
def move_event_external(linked_account_id, uid, attributes={})
  response = Podio.connection.post do |req|
    req.url "/calendar/linked_account/#{linked_account_id}/event/#{CGI.escape(uid)}/move"
    req.body = attributes
  end
  member response.body
end
set_global_export(linked_account_id, attributes={}) click to toggle source

@see developers.podio.com/doc/calendar/get-global-export-9381099

# File lib/podio/models/calendar_event.rb, line 151
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={}) click to toggle source

@see developers.podio.com/doc/calendar/set-reference-export-9183515

# File lib/podio/models/calendar_event.rb, line 130
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) click to toggle source
# File lib/podio/models/calendar_event.rb, line 166
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) click to toggle source

@see developers.podio.com/doc/calendar/stop-reference-export-9183590

# File lib/podio/models/calendar_event.rb, line 146
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
update_event_duration(uid, attributes={}) click to toggle source

@see

# File lib/podio/models/calendar_event.rb, line 73
def update_event_duration(uid, attributes={})
  response = Podio.connection.put do |req|
    req.url "/calendar/event/#{uid}/duration"
    req.body = attributes
  end
  member response.body
end
update_event_duration_external(linked_account_id, uid, attributes={}) click to toggle source

@see

# File lib/podio/models/calendar_event.rb, line 82
def update_event_duration_external(linked_account_id, uid, attributes={})
  response = Podio.connection.put do |req|
    req.url "/calendar/linked_account/#{linked_account_id}/event/#{CGI.escape(uid)}/duration"
    req.body = attributes
  end
  member response.body
end