Class: ChurchCommunityBuilder::ApiReader

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

Overview

This adapter is the standard for all loading objects.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#headersObject (readonly)

Returns the value of attribute headers.



5
6
7
# File 'lib/readers/api_reader.rb', line 5

def headers
  @headers
end

Instance Method Details

#load_feedObject

Loads the list

Returns:

  • the data loaded in a JSON object.



14
15
16
17
18
19
20
# File 'lib/readers/api_reader.rb', line 14

def load_feed 
  @url_data_params ||= {}
  response = ChurchCommunityBuilder::admin_request(:get, @url_data_params)
  data = _xml2json(response.body)
  @headers = response.headers
  return data
end