Class: FellowshipOne::CommunicationReader

Inherits:
ApiReader
  • Object
show all
Defined in:
lib/readers/communication_reader.rb

Instance Attribute Summary

Attributes inherited from ApiReader

#headers

Instance Method Summary collapse

Methods inherited from ApiReader

#load_feed, #load_new

Constructor Details

#initialize(person_id, communication_id) ⇒ CommunicationReader

Constructor.

Parameters:

  • person_id

    The ID of the person to load the communication for.

  • communication_id (optional)

    The ID of the communication to load.


9
10
11
12
13
14
15
# File 'lib/readers/communication_reader.rb', line 9

def initialize(person_id, communication_id)
  if communication_id.nil?
    @url_new_data_path = "/v1/People/#{person_id}/Communications/new"
  else
    @url_data_path = "/v1/People/#{person_id}/Communications/#{communication_id}"
  end      
end