Class: SparkApi::Models::NewsFeedMeta

Inherits:
Base
  • Object
show all
Defined in:
lib/spark_api/models/news_feed_meta.rb

Constant Summary

Constants included from Paginate

Paginate::DEFAULT_PAGE_SIZE

Instance Attribute Summary

Attributes inherited from Base

#attributes, #errors, #parent

Instance Method Summary collapse

Methods inherited from Base

connection, #connection, count, element_name, element_name=, first, get, #id, #initialize, #load, #method_missing, #parse_id, path, #path, #persisted?, prefix, prefix=, #resource_pluralized, #resource_uri, #respond_to?, #to_param, #to_partial_path

Methods included from Paginate

#collect, #paginate, #per_page

Methods included from Dirty

#changed, #changed?, #changed_attributes, #changes, #dirty_attributes, #previous_changes

Constructor Details

This class inherits a constructor from SparkApi::Models::Base

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class SparkApi::Models::Base

Instance Method Details

#core_field_namesObject



11
12
13
14
15
16
17
18
19
# File 'lib/spark_api/models/news_feed_meta.rb', line 11

def core_field_names
  fields = data['Subscriptions']['SavedSearches']['CoreSearchFields'].dup

  data['Subscriptions']['SavedSearches']['CoreStandardFields'].each do |field|
    fields << field[1]['Label']
  end

  fields
end

#core_fieldsObject



21
22
23
24
25
26
27
28
29
# File 'lib/spark_api/models/news_feed_meta.rb', line 21

def core_fields
  fields = data['Subscriptions']['SavedSearches']['CoreSearchFields'].dup

  data['Subscriptions']['SavedSearches']['CoreStandardFields'].each do |field|
    fields << field.first
  end

  fields
end

#minimum_core_fieldsObject



7
8
9
# File 'lib/spark_api/models/news_feed_meta.rb', line 7

def minimum_core_fields
  data['Subscriptions']['SavedSearches']['MinimumCoreFields']
end