mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 09:28:40 +00:00
Move usage
This commit is contained in:
parent
372317bee7
commit
cfeced03e4
2 changed files with 10 additions and 10 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Databases\Usage;
|
namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Usage;
|
||||||
|
|
||||||
use Appwrite\Platform\Modules\Databases\Http\Databases\Usage\Get as DatabaseUsageGet;
|
use Appwrite\Platform\Modules\Databases\Http\Databases\Usage\Get as DatabaseUsageGet;
|
||||||
use Appwrite\SDK\AuthType;
|
use Appwrite\SDK\AuthType;
|
||||||
|
|
@ -16,7 +16,7 @@ class Get extends DatabaseUsageGet
|
||||||
{
|
{
|
||||||
public static function getName(): string
|
public static function getName(): string
|
||||||
{
|
{
|
||||||
return 'getTablesDatabaseUsage';
|
return 'getUsage';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
|
|
@ -24,16 +24,16 @@ class Get extends DatabaseUsageGet
|
||||||
$this
|
$this
|
||||||
->setHttpMethod(self::HTTP_REQUEST_METHOD_GET)
|
->setHttpMethod(self::HTTP_REQUEST_METHOD_GET)
|
||||||
->setHttpPath('/v1/tablesdb/:databaseId/usage')
|
->setHttpPath('/v1/tablesdb/:databaseId/usage')
|
||||||
->desc('Get database usage stats')
|
->desc('Get TablesDB usage stats')
|
||||||
->groups(['api', 'database', 'usage'])
|
->groups(['api', 'database', 'usage'])
|
||||||
->label('scope', 'collections.read')
|
->label('scope', 'tables.read')
|
||||||
->label('resourceType', RESOURCE_TYPE_DATABASES)
|
->label('resourceType', RESOURCE_TYPE_DATABASES)
|
||||||
->label('sdk', [
|
->label('sdk', [
|
||||||
new Method(
|
new Method(
|
||||||
namespace: 'tablesdb',
|
namespace: 'tablesdb',
|
||||||
group: null,
|
group: null,
|
||||||
name: 'getDatabaseUsage',
|
name: 'getDatabaseUsage',
|
||||||
description: '/docs/references/tablesdb/get-database-usage.md',
|
description: '/docs/references/tablesdb/get-usage.md',
|
||||||
auth: [AuthType::ADMIN],
|
auth: [AuthType::ADMIN],
|
||||||
responses: [
|
responses: [
|
||||||
new SDKResponse(
|
new SDKResponse(
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Databases\Usage;
|
namespace Appwrite\Platform\Modules\Databases\Http\TablesDB\Usage;
|
||||||
|
|
||||||
use Appwrite\Platform\Modules\Databases\Http\Databases\Usage\XList as DatabaseUsageXList;
|
use Appwrite\Platform\Modules\Databases\Http\Databases\Usage\XList as DatabaseUsageXList;
|
||||||
use Appwrite\SDK\AuthType;
|
use Appwrite\SDK\AuthType;
|
||||||
|
|
@ -15,7 +15,7 @@ class XList extends DatabaseUsageXList
|
||||||
{
|
{
|
||||||
public static function getName(): string
|
public static function getName(): string
|
||||||
{
|
{
|
||||||
return 'listTablesDatabaseUsage';
|
return 'listUsage';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
|
|
@ -23,16 +23,16 @@ class XList extends DatabaseUsageXList
|
||||||
$this
|
$this
|
||||||
->setHttpMethod(self::HTTP_REQUEST_METHOD_GET)
|
->setHttpMethod(self::HTTP_REQUEST_METHOD_GET)
|
||||||
->setHttpPath('/v1/tablesdb/usage')
|
->setHttpPath('/v1/tablesdb/usage')
|
||||||
->desc('Get databases usage stats')
|
->desc('Get TablesDB usage stats')
|
||||||
->groups(['api', 'database', 'usage'])
|
->groups(['api', 'database', 'usage'])
|
||||||
->label('scope', 'collections.read')
|
->label('scope', 'tables.read')
|
||||||
->label('resourceType', RESOURCE_TYPE_DATABASES)
|
->label('resourceType', RESOURCE_TYPE_DATABASES)
|
||||||
->label('sdk', [
|
->label('sdk', [
|
||||||
new Method(
|
new Method(
|
||||||
namespace: 'tablesdb',
|
namespace: 'tablesdb',
|
||||||
group: null,
|
group: null,
|
||||||
name: 'listDatabaseUsage',
|
name: 'listDatabaseUsage',
|
||||||
description: '/docs/references/tablesdb/list-database-usage.md',
|
description: '/docs/references/tablesdb/list-usage.md',
|
||||||
auth: [AuthType::ADMIN],
|
auth: [AuthType::ADMIN],
|
||||||
responses: [
|
responses: [
|
||||||
new SDKResponse(
|
new SDKResponse(
|
||||||
Loading…
Reference in a new issue