lib/cellect/client/connection.rb in cellect-client-0.1.2.pre.jruby vs lib/cellect/client/connection.rb in cellect-client-0.1.2

- old
+ new

@@ -14,26 +14,26 @@ def delete_workflow(id) broadcast :delete, "/workflows/#{ id }" end - def add_subject(id, workflow_id: workflow_id, group_id: nil, priority: nil) + def add_subject(id, workflow_id:, group_id: nil, priority: nil) broadcast :put, "/workflows/#{ workflow_id }/add", querystring(subject_id: id, group_id: group_id, priority: priority) end - def remove_subject(id, workflow_id: workflow_id, group_id: nil) + def remove_subject(id, workflow_id:, group_id: nil) broadcast :put, "/workflows/#{ workflow_id }/remove", querystring(subject_id: id, group_id: group_id) end - def load_user(user_id: user_id, host: host, workflow_id: workflow_id) + def load_user(user_id:, host:, workflow_id:) send_http host, :post, "/workflows/#{ workflow_id }/users/#{ user_id }/load" end - def add_seen(subject_id: subject_id, user_id: user_id, host: host, workflow_id: workflow_id) + def add_seen(subject_id:, user_id:, host:, workflow_id:) send_http host, :put, "/workflows/#{ workflow_id }/users/#{ user_id }/add_seen", querystring(subject_id: subject_id) end - def get_subjects(user_id: user_id, host: host, workflow_id: workflow_id, limit: limit, group_id: group_id) + def get_subjects(user_id:, host:, workflow_id:, limit: nil, group_id: nil) response = send_http host, :get, "/workflows/#{ workflow_id }", querystring(user_id: user_id, group_id: group_id, limit: limit) ensure_valid_response response MultiJson.load response.body end