Sha256: b8294775fa0a89bdbec7cd695e2e08dc7b622da57da972ff9befd5a3ced37667
Contents?: true
Size: 1.08 KB
Versions: 1
Compression:
Stored size: 1.08 KB
Contents
# encoding: utf-8 # frozen_string_literal: true module Nimbu module Endpoints class Themes < Endpoint def layouts(options = {}, &block) Nimbu::Builder.new("Themes::Layouts", current_options.merge(options), &block) end def templates(options = {}, &block) Nimbu::Builder.new("Themes::Templates", current_options.merge(options), &block) end def snippets(options = {}, &block) Nimbu::Builder.new("Themes::Snippets", current_options.merge(options), &block) end def assets(options = {}, &block) Nimbu::Builder.new("Themes::Assets", current_options.merge(options), &block) end def list(*args, &block) arguments(args) response = get_request("/themes", arguments.params) return response unless block_given? response.each(&block) end alias_method :all, :list def get(*args) arguments(args, required: [:theme_id]) get_request("/themes/#{theme_id}", arguments.params) end alias_method :find, :get end # Themes end # Endpoints end # Nimbu
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
nimbu-api-0.5.0 | lib/nimbu-api/endpoints/themes.rb |