diff --git a/VERSION b/VERSION index 56e9df1..a3f5a8e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.10.3 \ No newline at end of file +0.10.3 diff --git a/samples/GoalsSample.yaml b/samples/GoalsSample.yaml new file mode 100644 index 0000000..94ae5ab --- /dev/null +++ b/samples/GoalsSample.yaml @@ -0,0 +1,151 @@ +goals: + addFollowers: >- + goals->addFollowers(array('field' => 'value', 'field' => 'value'), array('opt_pretty' => 'true')) + addSubgoal: >- + goals->addSubgoal(array('field' => 'value', 'field' => 'value'), array('opt_pretty' => 'true')) + addSupportingWorkForGoal: >- + goals->addSupportingWorkForGoal(array('field' => 'value', 'field' => 'value'), array('opt_pretty' => 'true')) + createGoalMetric: >- + goals->createGoalMetric(array('field' => 'value', 'field' => 'value'), array('opt_pretty' => 'true')) + deleteGoal: >- + goals->deleteGoal($goal_gid, array('opt_pretty' => 'true')) + getGoal: >- + goals->getGoal($goal_gid, array('param' => 'value', 'param' => 'value'), array('opt_pretty' => 'true')) + getGoals: >- + goals->getGoals(array('param' => 'value', 'param' => 'value'), array('opt_pretty' => 'true')) + getParentGoalsForGoal: >- + goals->getParentGoalsForGoal(array('param' => 'value', 'param' => 'value'), array('opt_pretty' => 'true')) + getSubgoalsForGoal: >- + goals->getSubgoalsForGoal(array('param' => 'value', 'param' => 'value'), array('opt_pretty' => 'true')) + removeFollowers: >- + goals->removeFollowers(array('field' => 'value', 'field' => 'value'), array('opt_pretty' => 'true')) + removeSubgoal: >- + goals->removeSubgoal(array('field' => 'value', 'field' => 'value'), array('opt_pretty' => 'true')) + removeSupportingWorkForGoal: >- + goals->removeSupportingWorkForGoal(array('field' => 'value', 'field' => 'value'), array('opt_pretty' => 'true')) + supportingWork: >- + goals->supportingWork(array('param' => 'value', 'param' => 'value'), array('opt_pretty' => 'true')) + updateGoal: >- + goals->updateGoal($goal_gid, array('field' => 'value', 'field' => 'value'), array('opt_pretty' => 'true')) + updateGoalMetric: >- + goals->updateGoalMetric(array('field' => 'value', 'field' => 'value'), array('opt_pretty' => 'true')) diff --git a/src/Asana/Resources/Gen/GoalsBase.php b/src/Asana/Resources/Gen/GoalsBase.php new file mode 100644 index 0000000..0dcfc06 --- /dev/null +++ b/src/Asana/Resources/Gen/GoalsBase.php @@ -0,0 +1,185 @@ +client = $client; + } + + /** Add a collaborator to a goal + * + * @param array $params + * @param array $options + * @return response + */ + public function addFollowers($params = array(), $options = array()) { + $path = "/goals/{goal_gid}/addFollowers"; + return $this->client->post($path, $params, $options); + } + + /** Add a subgoal to a parent goal + * + * @param array $params + * @param array $options + * @return response + */ + public function addSubgoal($params = array(), $options = array()) { + $path = "/goals/{goal_gid}/addSubgoal"; + return $this->client->post($path, $params, $options); + } + + /** Add a project/portfolio as supporting work for a goal. + * + * @param array $params + * @param array $options + * @return response + */ + public function addSupportingWorkForGoal($params = array(), $options = array()) { + $path = "/goals/{goal_gid}/addSupportingWork"; + return $this->client->post($path, $params, $options); + } + + /** Create a goal metric + * + * @param array $params + * @param array $options + * @return response + */ + public function createGoalMetric($params = array(), $options = array()) { + $path = "/goals/{goal_gid}/setMetric"; + return $this->client->post($path, $params, $options); + } + + /** Delete a goal + * + * @param string $goal_gid (required) Globally unique identifier for the goal. + * @param array $params + * @param array $options + * @return response + */ + public function deleteGoal($goal_gid, $params = array(), $options = array()) { + $path = "/goals/{goal_gid}"; + $path = str_replace("{goal_gid}", $goal_gid, $path); + return $this->client->delete($path, $params, $options); + } + + /** Get a goal + * + * @param string $goal_gid (required) Globally unique identifier for the goal. + * @param array $params + * @param array $options + * @return response + */ + public function getGoal($goal_gid, $params = array(), $options = array()) { + $path = "/goals/{goal_gid}"; + $path = str_replace("{goal_gid}", $goal_gid, $path); + return $this->client->get($path, $params, $options); + } + + /** Get goals + * + * @param array $params + * @param array $options + * @return response + */ + public function getGoals($params = array(), $options = array()) { + $path = "/goals"; + return $this->client->getCollection($path, $params, $options); + } + + /** Get parent goals from a goal + * + * @param array $params + * @param array $options + * @return response + */ + public function getParentGoalsForGoal($params = array(), $options = array()) { + $path = "/goals/{goal_gid}/parentGoals"; + return $this->client->getCollection($path, $params, $options); + } + + /** Get subgoals from a goal + * + * @param array $params + * @param array $options + * @return response + */ + public function getSubgoalsForGoal($params = array(), $options = array()) { + $path = "/goals/{goal_gid}/subgoals"; + return $this->client->getCollection($path, $params, $options); + } + + /** Remove a collaborator from a goal + * + * @param array $params + * @param array $options + * @return response + */ + public function removeFollowers($params = array(), $options = array()) { + $path = "/goals/{goal_gid}/removeFollowers"; + return $this->client->post($path, $params, $options); + } + + /** Remove a subgoal from a goal + * + * @param array $params + * @param array $options + * @return response + */ + public function removeSubgoal($params = array(), $options = array()) { + $path = "/goals/{goal_gid}/removeSubgoal"; + return $this->client->post($path, $params, $options); + } + + /** Remove a project/portfolio as supporting work for a goal. + * + * @param array $params + * @param array $options + * @return response + */ + public function removeSupportingWorkForGoal($params = array(), $options = array()) { + $path = "/goals/{goal_gid}/removeSupportingWork"; + return $this->client->post($path, $params, $options); + } + + /** Get supporting work from a goal + * + * @param array $params + * @param array $options + * @return response + */ + public function supportingWork($params = array(), $options = array()) { + $path = "/goals/{goal_gid}/supportingWork"; + return $this->client->getCollection($path, $params, $options); + } + + /** Update a goal + * + * @param string $goal_gid (required) Globally unique identifier for the goal. + * @param array $params + * @param array $options + * @return response + */ + public function updateGoal($goal_gid, $params = array(), $options = array()) { + $path = "/goals/{goal_gid}"; + $path = str_replace("{goal_gid}", $goal_gid, $path); + return $this->client->put($path, $params, $options); + } + + /** Update a goal metric + * + * @param array $params + * @param array $options + * @return response + */ + public function updateGoalMetric($params = array(), $options = array()) { + $path = "/goals/{goal_gid}/setMetricCurrentValue"; + return $this->client->post($path, $params, $options); + } +}