From 36604a4fcf1e85b47ead51204e3416683f474973 Mon Sep 17 00:00:00 2001 From: Joe Hart Date: Tue, 21 Jan 2020 10:26:49 -0800 Subject: [PATCH 1/3] Fixed for Alfred 4 and updated workspace to use gid in place if id --- asana.php | 4 ++-- workflows.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/asana.php b/asana.php index 2edae31..048dfb9 100644 --- a/asana.php +++ b/asana.php @@ -437,7 +437,7 @@ private function get_workspaces($apikey){ $workspaces = array(); foreach ($data as $workspace) { - $id = $workspace['id']; + $id = $workspace['gid']; $name = $workspace['name']; // // Set IDs for workspaces @@ -466,7 +466,7 @@ private function get_projects($workspaces,$apikey){ $project_id = $project['id']; $projects[$name] = array(); - $projects[$name]['id'] = "$project_id"; + $projects[$name]['gid'] = "$project_id"; $projects[$name]['workspace'] = "$workspace"; $projects[$name]['workspace_id'] = "$workspace_id"; diff --git a/workflows.php b/workflows.php index eb71d94..5a25360 100644 --- a/workflows.php +++ b/workflows.php @@ -38,8 +38,8 @@ function __construct() $this->bundle = basename( $this->path ); endif; - $this->cache = $this->home. "/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Data/".$this->bundle; - $this->data = $this->home. "/Library/Application Support/Alfred 3/Workflow Data/".$this->bundle; + $this->cache = $this->home. "/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/".$this->bundle; + $this->data = $this->home. "/Library/Application Support/Alfred/Workflow Data/".$this->bundle; if ( !file_exists( $this->cache ) ): exec("mkdir '".$this->cache."'"); From 03631f9e120b67aa6d1bf9b72ed39a10a951a301 Mon Sep 17 00:00:00 2001 From: Joe Hart Date: Tue, 21 Jan 2020 11:42:28 -0800 Subject: [PATCH 2/3] fixed workspaces with gid --- asana.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asana.php b/asana.php index 048dfb9..afb914b 100644 --- a/asana.php +++ b/asana.php @@ -463,7 +463,7 @@ private function get_projects($workspaces,$apikey){ foreach ($return as $project){ $name = $project['name']; - $project_id = $project['id']; + $project_id = $project['gid']; $projects[$name] = array(); $projects[$name]['gid'] = "$project_id"; From 21bca5261f9b0d8e5c894c5a477720598de6024a Mon Sep 17 00:00:00 2001 From: Joe Hart Date: Tue, 21 Jan 2020 11:52:24 -0800 Subject: [PATCH 3/3] Fixed workflow again.. changed wrong line. --- .gitignore | 1 + asana.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e43b0f9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.DS_Store diff --git a/asana.php b/asana.php index afb914b..d555a15 100644 --- a/asana.php +++ b/asana.php @@ -466,7 +466,7 @@ private function get_projects($workspaces,$apikey){ $project_id = $project['gid']; $projects[$name] = array(); - $projects[$name]['gid'] = "$project_id"; + $projects[$name]['id'] = "$project_id"; $projects[$name]['workspace'] = "$workspace"; $projects[$name]['workspace_id'] = "$workspace_id";