Skip to content

Commit b3bb237

Browse files
committed
chore: updates for appwrite 1.6.x
1 parent 148ae6b commit b3bb237

File tree

5 files changed

+1
-95
lines changed

5 files changed

+1
-95
lines changed

docs/examples/functions/get-deployment-download.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use Appwrite\Services\Functions;
66
$client = (new Client())
77
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
88
->setProject('<YOUR_PROJECT_ID>') // Your project ID
9-
->setSession(''); // The user session to authenticate with
9+
->setKey('<YOUR_API_KEY>'); // Your secret API key
1010

1111
$functions = new Functions($client);
1212

docs/examples/functions/get-template.md

-14
This file was deleted.

docs/functions.md

-14
Original file line numberDiff line numberDiff line change
@@ -67,20 +67,6 @@ GET https://cloud.appwrite.io/v1/functions/specifications
6767
** List allowed function specifications for this instance.
6868
**
6969

70-
## Get function template
71-
72-
```http request
73-
GET https://cloud.appwrite.io/v1/functions/templates/{templateId}
74-
```
75-
76-
** Get a function template using ID. You can use template details in [createFunction](/docs/references/cloud/server-nodejs/functions#create) method. **
77-
78-
### Parameters
79-
80-
| Field Name | Type | Description | Default |
81-
| --- | --- | --- | --- |
82-
| templateId | string | **Required** Template ID. | |
83-
8470
## Get function
8571

8672
```http request

src/Appwrite/Services/Functions.php

-33
Original file line numberDiff line numberDiff line change
@@ -248,39 +248,6 @@ public function listSpecifications(): array
248248
);
249249
}
250250

251-
/**
252-
* Get function template
253-
*
254-
* Get a function template using ID. You can use template details in
255-
* [createFunction](/docs/references/cloud/server-nodejs/functions#create)
256-
* method.
257-
*
258-
* @param string $templateId
259-
* @throws AppwriteException
260-
* @return array
261-
*/
262-
public function getTemplate(string $templateId): array
263-
{
264-
$apiPath = str_replace(
265-
['{templateId}'],
266-
[$templateId],
267-
'/functions/templates/{templateId}'
268-
);
269-
270-
$apiParams = [];
271-
$apiParams['templateId'] = $templateId;
272-
273-
$apiHeaders = [];
274-
$apiHeaders['content-type'] = 'application/json';
275-
276-
return $this->client->call(
277-
Client::METHOD_GET,
278-
$apiPath,
279-
$apiHeaders,
280-
$apiParams
281-
);
282-
}
283-
284251
/**
285252
* Get function
286253
*

tests/Appwrite/Services/FunctionsTest.php

-33
Original file line numberDiff line numberDiff line change
@@ -109,39 +109,6 @@ public function testMethodListSpecifications(): void {
109109
$this->assertSame($data, $response);
110110
}
111111

112-
public function testMethodGetTemplate(): void {
113-
114-
$data = array(
115-
"icon" => "icon-lightning-bolt",
116-
"id" => "starter",
117-
"name" => "Starter function",
118-
"tagline" => "A simple function to get started.",
119-
"permissions" => array(),
120-
"events" => array(),
121-
"cron" => "0 0 * * *",
122-
"timeout" => 300,
123-
"useCases" => array(),
124-
"runtimes" => array(),
125-
"instructions" => "For documentation and instructions check out <link>.",
126-
"vcsProvider" => "github",
127-
"providerRepositoryId" => "templates",
128-
"providerOwner" => "appwrite",
129-
"providerVersion" => "main",
130-
"variables" => array(),
131-
"scopes" => array(),);
132-
133-
134-
$this->client
135-
->allows()->call(Mockery::any(), Mockery::any(), Mockery::any(), Mockery::any())
136-
->andReturn($data);
137-
138-
$response = $this->functions->getTemplate(
139-
"<TEMPLATE_ID>"
140-
);
141-
142-
$this->assertSame($data, $response);
143-
}
144-
145112
public function testMethodGet(): void {
146113

147114
$data = array(

0 commit comments

Comments
 (0)