Sha256: 8e3a8caa43d7b794a442f3a0d639c214e5f20a271f9f02a815a8a8aeeac416b6

Contents?: true

Size: 1.09 KB

Versions: 6

Compression:

Stored size: 1.09 KB

Contents

module Voog
  class API

    # Voog Layouts API methods.
    #
    # @see http://www.voog.com/developers/api/resources/layouts
    module Layouts

      # List layouts
      #
      # @see http://www.voog.com/developers/api/resources/layouts#get_layouts
      def layouts(params = {})
        paginate 'layouts', {query: params}
      end

      # Get a single layout
      #
      # @see http://www.voog.com/developers/api/resources/layouts#get_layout
      def layout(id, params = {})
        get "layouts/#{id}", {query: params}
      end

      # Create a layout
      #
      # @see http://www.voog.com/developers/api/resources/layouts#create_layout
      def create_layout(data)
        post 'layouts', data
      end

      # Update a layout
      #
      # @see http://www.voog.com/developers/api/resources/layouts#update_layout
      def update_layout(id, data)
        put "layouts/#{id}", data
      end

      # Delete a layout
      #
      # @see http://www.voog.com/developers/api/resources/layouts#remove_layout
      def delete_layout(id)
        delete "layouts/#{id}"
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
voog_api-0.0.16 lib/voog_api/api/layouts.rb
voog_api-0.0.15 lib/voog_api/api/layouts.rb
voog_api-0.0.14 lib/voog_api/api/layouts.rb
voog_api-0.0.13 lib/voog_api/api/layouts.rb
voog_api-0.0.12 lib/voog_api/api/layouts.rb
voog_api-0.0.11 lib/voog_api/api/layouts.rb