adding method to add task

Adding tasks using the API