Skip to content

Commit

Permalink
Merge pull request #23 from appwrite/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
christyjacob4 committed Sep 7, 2023
2 parents 5ec7b33 + 72a7ba2 commit 461eedf
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 16 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Appwrite PHP SDK

![License](https://img.shields.io/github/license/appwrite/sdk-for-php.svg?style=flat-square&v=1)
![Version](https://img.shields.io/badge/api%20version-1.4.0-blue.svg?style=flat-square&v=1)
![Version](https://img.shields.io/badge/api%20version-1.4.2-blue.svg?style=flat-square&v=1)
[![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/functions/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ $client

$functions = new Functions($client);

$result = $functions->create('[FUNCTION_ID]', '[NAME]', 'node-14.5');
$result = $functions->create('[FUNCTION_ID]', '[NAME]', 'node-18.0');
2 changes: 1 addition & 1 deletion docs/examples/functions/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ $client

$functions = new Functions($client);

$result = $functions->update('[FUNCTION_ID]', '[NAME]', 'node-14.5');
$result = $functions->update('[FUNCTION_ID]', '[NAME]');
2 changes: 1 addition & 1 deletion docs/examples/teams/create-membership.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ $client

$teams = new Teams($client);

$result = $teams->createMembership('[TEAM_ID]', [], 'https://example.com');
$result = $teams->createMembership('[TEAM_ID]', []);
2 changes: 1 addition & 1 deletion docs/users.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ Labels can be used to grant access to resources. While teams are a way for user&
| Field Name | Type | Description | Default |
| --- | --- | --- | --- |
| userId | string | **Required** User ID. | |
| labels | array | Array of user labels. Replaces the previous labels. Maximum of 5 labels are allowed, each up to 36 alphanumeric characters long. | |
| labels | array | Array of user labels. Replaces the previous labels. Maximum of 100 labels are allowed, each up to 36 alphanumeric characters long. | |

## List User Logs

Expand Down
4 changes: 2 additions & 2 deletions src/Appwrite/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ class Client
*/
protected $headers = [
'content-type' => '',
'user-agent' => 'AppwritePHPSDK/9.0.1 ()',
'user-agent' => 'AppwritePHPSDK/10.0.0 ()',
'x-sdk-name'=> 'PHP',
'x-sdk-platform'=> 'server',
'x-sdk-language'=> 'php',
'x-sdk-version'=> '9.0.1',
'x-sdk-version'=> '10.0.0',
];

/**
Expand Down
5 changes: 1 addition & 4 deletions src/Appwrite/Services/Functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ public function get(string $functionId): array
* @return array
*/
public function update(string $functionId, string $name, string $runtime, array $execute = null, array $events = null, string $schedule = null, int $timeout = null, bool $enabled = null, bool $logging = null, string $entrypoint = null, string $commands = null, string $installationId = null, string $providerRepositoryId = null, string $providerBranch = null, bool $providerSilentMode = null, string $providerRootDirectory = null): array
public function update(string $functionId, string $name, string $runtime = null, array $execute = null, array $events = null, string $schedule = null, int $timeout = null, bool $enabled = null, bool $logging = null, string $entrypoint = null, string $commands = null, string $installationId = null, string $providerRepositoryId = null, string $providerBranch = null, bool $providerSilentMode = null, string $providerRootDirectory = null): array
{
$apiPath = str_replace(['{functionId}'], [$functionId], '/functions/{functionId}');

Expand All @@ -256,9 +256,6 @@ public function update(string $functionId, string $name, string $runtime, array
if (!isset($name)) {
throw new AppwriteException('Missing required parameter: "name"');
}
if (!isset($runtime)) {
throw new AppwriteException('Missing required parameter: "runtime"');
}
if (!is_null($name)) {
$apiParams['name'] = $name;
}
Expand Down
7 changes: 2 additions & 5 deletions src/Appwrite/Services/Teams.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,16 +231,16 @@ public function listMemberships(string $teamId, array $queries = null, string $s
*
* @param string $teamId
* @param array $roles
* @param string $url
* @param string $email
* @param string $userId
* @param string $phone
* @param string $url
* @param string $name
* @throws AppwriteException
* @return array
*/
public function createMembership(string $teamId, array $roles, string $url, string $email = null, string $userId = null, string $phone = null, string $name = null): array
public function createMembership(string $teamId, array $roles, string $email = null, string $userId = null, string $phone = null, string $url = null, string $name = null): array
{
$apiPath = str_replace(['{teamId}'], [$teamId], '/teams/{teamId}/memberships');

Expand All @@ -251,9 +251,6 @@ public function createMembership(string $teamId, array $roles, string $url, stri
if (!isset($roles)) {
throw new AppwriteException('Missing required parameter: "roles"');
}
if (!isset($url)) {
throw new AppwriteException('Missing required parameter: "url"');
}
if (!is_null($email)) {
$apiParams['email'] = $email;
}
Expand Down

0 comments on commit 461eedf

Please sign in to comment.