Sha256: c1fca4d9572adafe327b4a807c586583e8465b5002c0181879286e395615d5ff

Contents?: true

Size: 865 Bytes

Versions: 4

Compression:

Stored size: 865 Bytes

Contents

# encoding: utf-8

module Nimbu
  module Endpoints
    class Themes::Templates < Endpoint

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

        forced = arguments.params.delete("force")
        query_params = {}
        query_params = {force: forced} unless forced.nil?

        post_request("/themes/#{theme_id}/templates", arguments.params, params: query_params)
      end

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

        get_request("/themes/#{theme_id}/templates/#{template_id}", arguments.params)
      end

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

        delete_request("/themes/#{theme_id}/templates/#{template_id}", arguments.params)
      end
      alias :remove :delete


    end # Themes::Templates
  end # Endpoints
end # Nimbu

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
nimbu-api-0.4.4 lib/nimbu-api/endpoints/themes/templates.rb
nimbu-api-0.4.3 lib/nimbu-api/endpoints/themes/templates.rb
nimbu-api-0.4.2 lib/nimbu-api/endpoints/themes/templates.rb
nimbu-api-0.4.1 lib/nimbu-api/endpoints/themes/templates.rb