Skip to content

Commit

Permalink
Merge pull request #79 from Asana/openapi-sync
Browse files Browse the repository at this point in the history
Generated from OpenAPI
  • Loading branch information
aw-asana authored Aug 6, 2021
2 parents d5c466c + 0f658b7 commit 94a579a
Show file tree
Hide file tree
Showing 3 changed files with 337 additions and 1 deletion.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.10.3
0.10.3
151 changes: 151 additions & 0 deletions samples/GoalsSample.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
goals:
addFollowers: >-
<?php
require 'php-asana/vendor/autoload.php';
$client = Asana\Client::accessToken('PERSONAL_ACCESS_TOKEN');
$result = $client->goals->addFollowers(array('field' => 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
addSubgoal: >-
<?php
require 'php-asana/vendor/autoload.php';
$client = Asana\Client::accessToken('PERSONAL_ACCESS_TOKEN');
$result = $client->goals->addSubgoal(array('field' => 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
addSupportingWorkForGoal: >-
<?php
require 'php-asana/vendor/autoload.php';
$client = Asana\Client::accessToken('PERSONAL_ACCESS_TOKEN');
$result = $client->goals->addSupportingWorkForGoal(array('field' => 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
createGoalMetric: >-
<?php
require 'php-asana/vendor/autoload.php';
$client = Asana\Client::accessToken('PERSONAL_ACCESS_TOKEN');
$result = $client->goals->createGoalMetric(array('field' => 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
deleteGoal: >-
<?php
require 'php-asana/vendor/autoload.php';
$client = Asana\Client::accessToken('PERSONAL_ACCESS_TOKEN');
$result = $client->goals->deleteGoal($goal_gid, array('opt_pretty' => 'true'))
getGoal: >-
<?php
require 'php-asana/vendor/autoload.php';
$client = Asana\Client::accessToken('PERSONAL_ACCESS_TOKEN');
$result = $client->goals->getGoal($goal_gid, array('param' => 'value', 'param' => 'value'), array('opt_pretty' => 'true'))
getGoals: >-
<?php
require 'php-asana/vendor/autoload.php';
$client = Asana\Client::accessToken('PERSONAL_ACCESS_TOKEN');
$result = $client->goals->getGoals(array('param' => 'value', 'param' => 'value'), array('opt_pretty' => 'true'))
getParentGoalsForGoal: >-
<?php
require 'php-asana/vendor/autoload.php';
$client = Asana\Client::accessToken('PERSONAL_ACCESS_TOKEN');
$result = $client->goals->getParentGoalsForGoal(array('param' => 'value', 'param' => 'value'), array('opt_pretty' => 'true'))
getSubgoalsForGoal: >-
<?php
require 'php-asana/vendor/autoload.php';
$client = Asana\Client::accessToken('PERSONAL_ACCESS_TOKEN');
$result = $client->goals->getSubgoalsForGoal(array('param' => 'value', 'param' => 'value'), array('opt_pretty' => 'true'))
removeFollowers: >-
<?php
require 'php-asana/vendor/autoload.php';
$client = Asana\Client::accessToken('PERSONAL_ACCESS_TOKEN');
$result = $client->goals->removeFollowers(array('field' => 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
removeSubgoal: >-
<?php
require 'php-asana/vendor/autoload.php';
$client = Asana\Client::accessToken('PERSONAL_ACCESS_TOKEN');
$result = $client->goals->removeSubgoal(array('field' => 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
removeSupportingWorkForGoal: >-
<?php
require 'php-asana/vendor/autoload.php';
$client = Asana\Client::accessToken('PERSONAL_ACCESS_TOKEN');
$result = $client->goals->removeSupportingWorkForGoal(array('field' => 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
supportingWork: >-
<?php
require 'php-asana/vendor/autoload.php';
$client = Asana\Client::accessToken('PERSONAL_ACCESS_TOKEN');
$result = $client->goals->supportingWork(array('param' => 'value', 'param' => 'value'), array('opt_pretty' => 'true'))
updateGoal: >-
<?php
require 'php-asana/vendor/autoload.php';
$client = Asana\Client::accessToken('PERSONAL_ACCESS_TOKEN');
$result = $client->goals->updateGoal($goal_gid, array('field' => 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
updateGoalMetric: >-
<?php
require 'php-asana/vendor/autoload.php';
$client = Asana\Client::accessToken('PERSONAL_ACCESS_TOKEN');
$result = $client->goals->updateGoalMetric(array('field' => 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
185 changes: 185 additions & 0 deletions src/Asana/Resources/Gen/GoalsBase.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
<?php

namespace Asana\Resources\Gen;

class GoalsBase {

/**
* @param Asana/Client client The client instance
*/
public function __construct($client)
{
$this->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);
}
}

0 comments on commit 94a579a

Please sign in to comment.