Skip to content

Commit 6c0797f

Browse files
committed
Generated from OpenAPI
1 parent f088e2e commit 6c0797f

File tree

5 files changed

+129
-1
lines changed

5 files changed

+129
-1
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.10.7
1+
0.10.8

samples/ProjectTemplatesSample.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
projecttemplates:
2+
getProjectTemplate: >-
3+
<?php
4+
5+
require 'php-asana/vendor/autoload.php';
6+
7+
8+
$client = Asana\Client::accessToken('PERSONAL_ACCESS_TOKEN');
9+
10+
11+
$result = $client->projecttemplates->getProjectTemplate($project_template_gid, array('param' => 'value', 'param' => 'value'), array('opt_pretty' => 'true'))
12+
getProjectTemplates: >-
13+
<?php
14+
15+
require 'php-asana/vendor/autoload.php';
16+
17+
18+
$client = Asana\Client::accessToken('PERSONAL_ACCESS_TOKEN');
19+
20+
21+
$result = $client->projecttemplates->getProjectTemplates(array('param' => 'value', 'param' => 'value'), array('opt_pretty' => 'true'))
22+
getProjectTemplatesForTeam: >-
23+
<?php
24+
25+
require 'php-asana/vendor/autoload.php';
26+
27+
28+
$client = Asana\Client::accessToken('PERSONAL_ACCESS_TOKEN');
29+
30+
31+
$result = $client->projecttemplates->getProjectTemplatesForTeam($team_gid, array('param' => 'value', 'param' => 'value'), array('opt_pretty' => 'true'))
32+
instantiateProject: >-
33+
<?php
34+
35+
require 'php-asana/vendor/autoload.php';
36+
37+
38+
$client = Asana\Client::accessToken('PERSONAL_ACCESS_TOKEN');
39+
40+
41+
$result = $client->projecttemplates->instantiateProject($project_template_gid, array('field' => 'value', 'field' => 'value'), array('opt_pretty' => 'true'))

samples/ProjectsSample.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,16 @@ projects:
139139
140140
141141
$result = $client->projects->getTaskCountsForProject($project_gid, array('param' => 'value', 'param' => 'value'), array('opt_pretty' => 'true'))
142+
projectSaveAsTemplate: >-
143+
<?php
144+
145+
require 'php-asana/vendor/autoload.php';
146+
147+
148+
$client = Asana\Client::accessToken('PERSONAL_ACCESS_TOKEN');
149+
150+
151+
$result = $client->projects->projectSaveAsTemplate($project_gid, array('field' => 'value', 'field' => 'value'), array('opt_pretty' => 'true'))
142152
removeCustomFieldSettingForProject: >-
143153
<?php
144154
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<?php
2+
3+
namespace Asana\Resources\Gen;
4+
5+
class ProjectTemplatesBase {
6+
7+
/**
8+
* @param Asana/Client client The client instance
9+
*/
10+
public function __construct($client)
11+
{
12+
$this->client = $client;
13+
}
14+
15+
/** Get a project template
16+
*
17+
* @param string $project_template_gid (required) Globally unique identifier for the project template.
18+
* @param array $params
19+
* @param array $options
20+
* @return response
21+
*/
22+
public function getProjectTemplate($project_template_gid, $params = array(), $options = array()) {
23+
$path = "/project_templates/{project_template_gid}";
24+
$path = str_replace("{project_template_gid}", $project_template_gid, $path);
25+
return $this->client->get($path, $params, $options);
26+
}
27+
28+
/** Get multiple project templates
29+
*
30+
* @param array $params
31+
* @param array $options
32+
* @return response
33+
*/
34+
public function getProjectTemplates($params = array(), $options = array()) {
35+
$path = "/project_templates";
36+
return $this->client->getCollection($path, $params, $options);
37+
}
38+
39+
/** Get a team's project templates
40+
*
41+
* @param string $team_gid (required) Globally unique identifier for the team.
42+
* @param array $params
43+
* @param array $options
44+
* @return response
45+
*/
46+
public function getProjectTemplatesForTeam($team_gid, $params = array(), $options = array()) {
47+
$path = "/teams/{team_gid}/project_templates";
48+
$path = str_replace("{team_gid}", $team_gid, $path);
49+
return $this->client->getCollection($path, $params, $options);
50+
}
51+
52+
/** Instantiate a project from a project template
53+
*
54+
* @param string $project_template_gid (required) Globally unique identifier for the project template.
55+
* @param array $params
56+
* @param array $options
57+
* @return response
58+
*/
59+
public function instantiateProject($project_template_gid, $params = array(), $options = array()) {
60+
$path = "/project_templates/{project_template_gid}/instantiateProject";
61+
$path = str_replace("{project_template_gid}", $project_template_gid, $path);
62+
return $this->client->post($path, $params, $options);
63+
}
64+
}

src/Asana/Resources/Gen/ProjectsBase.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,19 @@ public function getTaskCountsForProject($project_gid, $params = array(), $option
190190
return $this->client->get($path, $params, $options);
191191
}
192192

193+
/** Create a project template from a project
194+
*
195+
* @param string $project_gid (required) Globally unique identifier for the project.
196+
* @param array $params
197+
* @param array $options
198+
* @return response
199+
*/
200+
public function projectSaveAsTemplate($project_gid, $params = array(), $options = array()) {
201+
$path = "/projects/{project_gid}/saveAsTemplate";
202+
$path = str_replace("{project_gid}", $project_gid, $path);
203+
return $this->client->post($path, $params, $options);
204+
}
205+
193206
/** Remove a custom field from a project
194207
*
195208
* @param string $project_gid (required) Globally unique identifier for the project.

0 commit comments

Comments
 (0)