Sha256: 776724cbbe6f35a471348b4f897f2d89c94819cd90973df216131d142c99d25a

Contents?: true

Size: 1.04 KB

Versions: 1

Compression:

Stored size: 1.04 KB

Contents

module TeamworkApi
  module API
    module TaskLists
      def create_task_list(project_id, args)
        args =
          API.params(args)
             .required(:name)
             .optional(
               :private,
               :pinned,
               :'milestone-id',
               :description,
               :'todo-list-template-id',
               :'todo-list-template-start-date',
               :'todo-list-template-keep-off-weekends',
               :'todo-list-template-assignments'
             ).to_h

        response = post "projects/#{project_id}/tasklists.json", tasklist: args
        response['TASKLISTID']
      end

      def update_task_list(task_list_id, args)
      end

      def task_list(task_list_id)
        response = get "/tasklists/#{task_list_id}.json"
        response.body['tasklist']
      end

      def task_lists
        response = get '/tasklists.json'
        response.body['tasklists']
      end

      def delete_task_list(task_list_id)
        delete "/tasklists/#{task_list_id}.json"
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
teamwork_api-0.1.0 lib/teamwork_api/api/task_lists.rb