Skip to content

Commit

Permalink
Merge pull request #85 from Asana/openapi-sync
Browse files Browse the repository at this point in the history
Generated from OpenAPI
  • Loading branch information
aw-asana authored Jan 26, 2022
2 parents d599499 + f3cdcf4 commit f088e2e
Show file tree
Hide file tree
Showing 5 changed files with 211 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.6
0.10.7
41 changes: 41 additions & 0 deletions samples/ProjectBriefsSample.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
projectbriefs:
createProjectBrief: >-
<?php
require 'php-asana/vendor/autoload.php';
$client = Asana\Client::accessToken('PERSONAL_ACCESS_TOKEN');
$result = $client->projectbriefs->createProjectBrief($project_gid, array('field' => 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
deleteProjectBrief: >-
<?php
require 'php-asana/vendor/autoload.php';
$client = Asana\Client::accessToken('PERSONAL_ACCESS_TOKEN');
$result = $client->projectbriefs->deleteProjectBrief($project_brief_gid, array('opt_pretty' => 'true'))
getProjectBrief: >-
<?php
require 'php-asana/vendor/autoload.php';
$client = Asana\Client::accessToken('PERSONAL_ACCESS_TOKEN');
$result = $client->projectbriefs->getProjectBrief($project_brief_gid, array('param' => 'value', 'param' => 'value'), array('opt_pretty' => 'true'))
updateProjectBrief: >-
<?php
require 'php-asana/vendor/autoload.php';
$client = Asana\Client::accessToken('PERSONAL_ACCESS_TOKEN');
$result = $client->projectbriefs->updateProjectBrief($project_brief_gid, array('field' => 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
41 changes: 41 additions & 0 deletions samples/StatusUpdatesSample.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
statusupdates:
createStatusForObject: >-
<?php
require 'php-asana/vendor/autoload.php';
$client = Asana\Client::accessToken('PERSONAL_ACCESS_TOKEN');
$result = $client->statusupdates->createStatusForObject(array('field' => 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
deleteStatus: >-
<?php
require 'php-asana/vendor/autoload.php';
$client = Asana\Client::accessToken('PERSONAL_ACCESS_TOKEN');
$result = $client->statusupdates->deleteStatus($status_gid, array('opt_pretty' => 'true'))
getStatus: >-
<?php
require 'php-asana/vendor/autoload.php';
$client = Asana\Client::accessToken('PERSONAL_ACCESS_TOKEN');
$result = $client->statusupdates->getStatus($status_gid, array('param' => 'value', 'param' => 'value'), array('opt_pretty' => 'true'))
getStatusesForObject: >-
<?php
require 'php-asana/vendor/autoload.php';
$client = Asana\Client::accessToken('PERSONAL_ACCESS_TOKEN');
$result = $client->statusupdates->getStatusesForObject(array('param' => 'value', 'param' => 'value'), array('opt_pretty' => 'true'))
66 changes: 66 additions & 0 deletions src/Asana/Resources/Gen/ProjectBriefsBase.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?php

namespace Asana\Resources\Gen;

class ProjectBriefsBase {

/**
* @param Asana/Client client The client instance
*/
public function __construct($client)
{
$this->client = $client;
}

/** Create a project brief
*
* @param string $project_gid (required) Globally unique identifier for the project.
* @param array $params
* @param array $options
* @return response
*/
public function createProjectBrief($project_gid, $params = array(), $options = array()) {
$path = "/projects/{project_gid}/project_briefs";
$path = str_replace("{project_gid}", $project_gid, $path);
return $this->client->post($path, $params, $options);
}

/** Delete a project brief
*
* @param string $project_brief_gid (required) Globally unique identifier for the project brief.
* @param array $params
* @param array $options
* @return response
*/
public function deleteProjectBrief($project_brief_gid, $params = array(), $options = array()) {
$path = "/project_briefs/{project_brief_gid}";
$path = str_replace("{project_brief_gid}", $project_brief_gid, $path);
return $this->client->delete($path, $params, $options);
}

/** Get a project brief
*
* @param string $project_brief_gid (required) Globally unique identifier for the project brief.
* @param array $params
* @param array $options
* @return response
*/
public function getProjectBrief($project_brief_gid, $params = array(), $options = array()) {
$path = "/project_briefs/{project_brief_gid}";
$path = str_replace("{project_brief_gid}", $project_brief_gid, $path);
return $this->client->get($path, $params, $options);
}

/** Update a project brief
*
* @param string $project_brief_gid (required) Globally unique identifier for the project brief.
* @param array $params
* @param array $options
* @return response
*/
public function updateProjectBrief($project_brief_gid, $params = array(), $options = array()) {
$path = "/project_briefs/{project_brief_gid}";
$path = str_replace("{project_brief_gid}", $project_brief_gid, $path);
return $this->client->put($path, $params, $options);
}
}
62 changes: 62 additions & 0 deletions src/Asana/Resources/Gen/StatusUpdatesBase.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<?php

namespace Asana\Resources\Gen;

class StatusUpdatesBase {

/**
* @param Asana/Client client The client instance
*/
public function __construct($client)
{
$this->client = $client;
}

/** Create a status update
*
* @param array $params
* @param array $options
* @return response
*/
public function createStatusForObject($params = array(), $options = array()) {
$path = "/status_updates";
return $this->client->post($path, $params, $options);
}

/** Delete a status update
*
* @param string $status_gid (required) The status update to get.
* @param array $params
* @param array $options
* @return response
*/
public function deleteStatus($status_gid, $params = array(), $options = array()) {
$path = "/status_updates/{status_gid}";
$path = str_replace("{status_gid}", $status_gid, $path);
return $this->client->delete($path, $params, $options);
}

/** Get a status update
*
* @param string $status_gid (required) The status update to get.
* @param array $params
* @param array $options
* @return response
*/
public function getStatus($status_gid, $params = array(), $options = array()) {
$path = "/status_updates/{status_gid}";
$path = str_replace("{status_gid}", $status_gid, $path);
return $this->client->get($path, $params, $options);
}

/** Get status updates from an object
*
* @param array $params
* @param array $options
* @return response
*/
public function getStatusesForObject($params = array(), $options = array()) {
$path = "/status_updates";
return $this->client->getCollection($path, $params, $options);
}
}

0 comments on commit f088e2e

Please sign in to comment.