Sha256: 08efa751271440708a449cc5afbd427164550e3d7b807917fce804e1b2e0a612

Contents?: true

Size: 1.05 KB

Versions: 6

Compression:

Stored size: 1.05 KB

Contents

module Cellect
  module Server
    class API
      class Sets < Grape::API
        # GET /workflows/:workflow_id
        # 
        # Returns a sample from the specified workflow
        # Accepts params
        #   limit: integer, default 5
        #   user_id: integer, optional
        #   group_id: integer, optional
        get do
          workflow.sample selector_params
        end

        # PUT /workflows/:workflow_id/add
        # 
        # Adds a subject to a workflow or updates the priority
        # Accepts params
        #   subject_id: integer
        #   group_id: integer, required if grouped
        #   priority: float, required if prioritized
        put :add do
          workflow.add update_params
          nil
        end

        # PUT /workflows/:workflow_id/remove
        # 
        # Removes a subject from a workflow
        # Accepts params
        #   subject_id: integer
        #   group_id: integer, required if grouped
        put :remove do
          workflow.remove update_params
          nil
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cellect-server-1.3.1 lib/cellect/server/api/sets.rb
cellect-server-1.3.0 lib/cellect/server/api/sets.rb
cellect-server-1.2.0 lib/cellect/server/api/sets.rb
cellect-server-1.1.0 lib/cellect/server/api/sets.rb
cellect-server-1.0.1 lib/cellect/server/api/sets.rb
cellect-server-1.0.0 lib/cellect/server/api/sets.rb