Sha256: d6b80ac5819f91cc08be955c371dacc4484df733d1e782e8d6395db2f742f8ed
Contents?: true
Size: 390 Bytes
Versions: 4
Compression:
Stored size: 390 Bytes
Contents
# frozen_string_literal: true require "httparty" # BlacklightApiFacets class BlacklightApiFacets include HTTParty def initialize(request) @request = request end def fetch @fetch ||= self.class.get("#{@request}#{BLACKLIGHT_JSON_API_FACETS}", query: {}) end def facets fetch["included"].select { |s| s["type"] == "facet" } if fetch["included"].present? end end
Version data entries
4 entries across 4 versions & 1 rubygems