Sha256: 280262a56c224580db45eedd88278d2fb4a775bfd3a022c14aa79dc1f3e02659

Contents?: true

Size: 1.04 KB

Versions: 16

Compression:

Stored size: 1.04 KB

Contents

# encoding: utf-8

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)
        arguments(args)

        response = get_request("/themes", arguments.params)
        return response unless block_given?
        response.each { |el| yield el }
      end
      alias :all :list

      def get(*args)
        arguments(args, :required => [:theme_id])

        get_request("/themes/#{theme_id}", arguments.params)
      end
      alias :find :get


    end # Themes
  end # Endpoints
end # Nimbu

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
nimbu-api-0.4.4 lib/nimbu-api/endpoints/themes.rb
nimbu-api-0.4.3 lib/nimbu-api/endpoints/themes.rb
nimbu-api-0.4.2 lib/nimbu-api/endpoints/themes.rb
nimbu-api-0.4.1 lib/nimbu-api/endpoints/themes.rb
nimbu-api-0.4.0 lib/nimbu-api/endpoints/themes.rb
nimbu-api-0.3.0 lib/nimbu-api/endpoints/themes.rb
nimbu-api-0.2.1 lib/nimbu-api/endpoints/themes.rb
nimbu-api-0.2 lib/nimbu-api/endpoints/themes.rb
nimbu-api-0.2.beta.3 lib/nimbu-api/endpoints/themes.rb
nimbu-api-0.2.beta.2 lib/nimbu-api/endpoints/themes.rb
nimbu-api-0.2.beta.1 lib/nimbu-api/endpoints/themes.rb
nimbu-api-0.2.beta lib/nimbu-api/endpoints/themes.rb
nimbu-api-0.1.5 lib/nimbu-api/endpoints/themes.rb
nimbu-api-0.1.4 lib/nimbu-api/endpoints/themes.rb
nimbu-api-0.1.3 lib/nimbu-api/endpoints/themes.rb
nimbu-api-0.1.1 lib/nimbu-api/endpoints/themes.rb