Last active
January 3, 2016 14:59
-
-
Save mannieschumpert/8480059 to your computer and use it in GitHub Desktop.
A PHP script to add a list of tasks to Asana via an array.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$apikey = ""; // Your API key | |
$workspace = ''; // your project's workspace ID | |
$project = ''; // your project's ID | |
$tasks = array( | |
'Task 1', | |
'Task 2', | |
'Task 3' | |
// etc | |
); | |
// use this line if you want your tasks to be displayed in Asana in the order of the array | |
$tasks = array_reverse($tasks); | |
foreach ($tasks as $task){ | |
exec( 'curl -u '.$apikey.': https://app.asana.com/api/1.0/tasks -d "name='.$task.'" -d "projects[0]='.$project.'" -d "workspace='.$workspace.'"', $return); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment