Sha256: c5637c9e1df623db9c65515a49a830543ce3c5fae6553dbb863be2d3627c313f

Contents?: true

Size: 931 Bytes

Versions: 32

Compression:

Stored size: 931 Bytes

Contents

module SparkApi
  module Models
    class NewsFeedMeta < Base

      self.element_name = "newsfeeds/meta"

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

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

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

        fields
      end

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

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

        fields
      end

      private

      def data
        if attributes.empty?
          @data ||= connection.get(self.path).first
        else
          attributes
        end
      end

    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
spark_api-2.0.0 lib/spark_api/models/news_feed_meta.rb
spark_api-1.6.3 lib/spark_api/models/news_feed_meta.rb
spark_api-1.6.2 lib/spark_api/models/news_feed_meta.rb
spark_api-1.6.1 lib/spark_api/models/news_feed_meta.rb
spark_api-1.5.7 lib/spark_api/models/news_feed_meta.rb
spark_api-1.6.0 lib/spark_api/models/news_feed_meta.rb
spark_api-1.5.6 lib/spark_api/models/news_feed_meta.rb
spark_api-1.5.5 lib/spark_api/models/news_feed_meta.rb
spark_api-1.5.4 lib/spark_api/models/news_feed_meta.rb
spark_api-1.5.3 lib/spark_api/models/news_feed_meta.rb
spark_api-1.5.2 lib/spark_api/models/news_feed_meta.rb
spark_api-1.5.1 lib/spark_api/models/news_feed_meta.rb
spark_api-1.5.0 lib/spark_api/models/news_feed_meta.rb
spark_api-1.4.34 lib/spark_api/models/news_feed_meta.rb
spark_api-1.4.32 lib/spark_api/models/news_feed_meta.rb
spark_api-1.4.31 lib/spark_api/models/news_feed_meta.rb
spark_api-1.4.29 lib/spark_api/models/news_feed_meta.rb
spark_api-1.4.28 lib/spark_api/models/news_feed_meta.rb
spark_api-1.4.27 lib/spark_api/models/news_feed_meta.rb
spark_api-1.4.26 lib/spark_api/models/news_feed_meta.rb