Sha256: b55c9ca9972bbeb601e4f7852b621106f28db278e763814430d4e96181d4a9c0

Contents?: true

Size: 930 Bytes

Versions: 6

Compression:

Stored size: 930 Bytes

Contents

module Voog
  class API

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

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

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

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

      # Reorder a node
      #
      # @see http://www.voog.com/developers/api/resources/nodes#relocate_node
      def move_node(node_id, params)
        put "nodes/#{node_id}/move", nil, {query: params}
      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/nodes.rb
voog_api-0.0.15 lib/voog_api/api/nodes.rb
voog_api-0.0.14 lib/voog_api/api/nodes.rb
voog_api-0.0.13 lib/voog_api/api/nodes.rb
voog_api-0.0.12 lib/voog_api/api/nodes.rb
voog_api-0.0.11 lib/voog_api/api/nodes.rb