module StrawberryAPI::Client::Features

Public Instance Methods

feature(id:) click to toggle source

Fetches a feature

@param [Integer] id Id of the feature to retrieve

@return [StrawberryAPI::Feature] The fetched feature

# File lib/strawberry_api/client/features.rb, line 22
def feature(id:)
   data = get("/features/#{id}").parse['feature']
   data.nil? ? nil : Feature.new(data)
end
features() click to toggle source

Fetches all features

@return [Array<StrawberryAPI::Feature>] A list of features

# File lib/strawberry_api/client/features.rb, line 10
def features
  get("/features").parse['features']&.map do |feature|
    Feature.new(feature)
  end
end