Sha256: 5bf50ec5e06a2d94726a28834879d8a60bed35b0ed99db5fb64f76a44a5eb1df

Contents?: true

Size: 699 Bytes

Versions: 9

Compression:

Stored size: 699 Bytes

Contents

# encoding: utf-8

module Nimbu
  module Endpoints
    class Themes::Snippets < Endpoint

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

        post_request("/themes/#{theme_id}/snippets", arguments.params)
      end

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

        get_request("/themes/#{theme_id}/snippets/#{snippet_id}", arguments.params)
      end

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

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


    end # Themes::Snippets
  end # Endpoints
end # Nimbu

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
nimbu-api-0.4.0 lib/nimbu-api/endpoints/themes/snippets.rb
nimbu-api-0.3.0 lib/nimbu-api/endpoints/themes/snippets.rb
nimbu-api-0.2.1 lib/nimbu-api/endpoints/themes/snippets.rb
nimbu-api-0.2 lib/nimbu-api/endpoints/themes/snippets.rb
nimbu-api-0.2.beta.3 lib/nimbu-api/endpoints/themes/snippets.rb
nimbu-api-0.2.beta.2 lib/nimbu-api/endpoints/themes/snippets.rb
nimbu-api-0.2.beta.1 lib/nimbu-api/endpoints/themes/snippets.rb
nimbu-api-0.2.beta lib/nimbu-api/endpoints/themes/snippets.rb
nimbu-api-0.1.5 lib/nimbu-api/endpoints/themes/snippets.rb