Open Data Catalog v2.0.0
Drupal\metastore\Controller\MetastoreController Class Reference
Inheritance diagram for Drupal\metastore\Controller\MetastoreController:

Public Member Functions

 __construct (MetastoreApiResponse $apiResponse, Service $service, DatasetApiDocs $docs)
 
 getSchemas ()
 
 getSchema (string $identifier)
 
 getAll (string $schema_id, Request $request)
 
 get (string $schema_id, string $identifier, Request $request)
 
 getResources (string $schema_id, string $identifier)
 
 post (string $schema_id, Request $request)
 
 publish (string $schema_id, string $identifier, Request $request)
 
 put ($schema_id, string $identifier, Request $request)
 
 patch ($schema_id, $identifier, Request $request)
 
 delete ($schema_id, $identifier)
 
 getCatalog ()
 
 getDocs ($identifier, Request $request)
 

Static Public Member Functions

static create (ContainerInterface $container)
 

Detailed Description

Class Api.

Todo:
Move docs stuff.

Definition at line 23 of file MetastoreController.php.

Constructor & Destructor Documentation

◆ __construct()

Drupal\metastore\Controller\MetastoreController::__construct ( MetastoreApiResponse  $apiResponse,
Service  $service,
DatasetApiDocs  $docs 
)

Constructor.

Definition at line 63 of file MetastoreController.php.

Member Function Documentation

◆ create()

static Drupal\metastore\Controller\MetastoreController::create ( ContainerInterface  $container)
static

Inherited.

{}

Definition at line 52 of file MetastoreController.php.

◆ delete()

Drupal\metastore\Controller\MetastoreController::delete (   $schema_id,
  $identifier 
)

Implements DELETE method.

Parameters
string$schema_idThe {schema_id} slug from the HTTP request.
string$identifierIdentifier.
Returns
\Symfony\Component\HttpFoundation\JsonResponse The json response.

Definition at line 328 of file MetastoreController.php.

◆ get()

Drupal\metastore\Controller\MetastoreController::get ( string  $schema_id,
string  $identifier,
Request  $request 
)

Implements GET method.

Parameters
string$schema_idThe {schema_id} slug from the HTTP request.
string$identifierIdentifier.
\Symfony\Component\HttpFoundation\Request$requestThe request object.
Returns
\Symfony\Component\HttpFoundation\JsonResponse The json response.

Definition at line 126 of file MetastoreController.php.

◆ getAll()

Drupal\metastore\Controller\MetastoreController::getAll ( string  $schema_id,
Request  $request 
)

Get all.

Parameters
string$schema_idThe {schema_id} slug from the HTTP request.
\Symfony\Component\HttpFoundation\Request$requestThe request object.
Returns
\Symfony\Component\HttpFoundation\JsonResponse The json response.

Definition at line 99 of file MetastoreController.php.

◆ getCatalog()

Drupal\metastore\Controller\MetastoreController::getCatalog ( )

Provides the data catalog.

Returns
\Symfony\Component\HttpFoundation\JsonResponse A json response, either the catalog or an exception.

Definition at line 344 of file MetastoreController.php.

◆ getDocs()

Drupal\metastore\Controller\MetastoreController::getDocs (   $identifier,
Request  $request 
)

Get the API docs spec for a specific dataset.

Parameters
string$identifierDataset identifier.
\Symfony\Component\HttpFoundation\Request$requestThe request object.
Returns
\Symfony\Component\HttpFoundation\JsonResponse A JSON response.

Definition at line 364 of file MetastoreController.php.

◆ getResources()

Drupal\metastore\Controller\MetastoreController::getResources ( string  $schema_id,
string  $identifier 
)

GET all resources associated with a dataset.

Parameters
string$schema_idThe {schema_id} slug from the HTTP request.
string$identifierIdentifier.
Returns
\Symfony\Component\HttpFoundation\JsonResponse The json response.

Definition at line 172 of file MetastoreController.php.

◆ getSchema()

Drupal\metastore\Controller\MetastoreController::getSchema ( string  $identifier)

Get schema.

Definition at line 79 of file MetastoreController.php.

◆ getSchemas()

Drupal\metastore\Controller\MetastoreController::getSchemas ( )

Get schemas.

Definition at line 72 of file MetastoreController.php.

◆ patch()

Drupal\metastore\Controller\MetastoreController::patch (   $schema_id,
  $identifier,
Request  $request 
)

Implements PATCH method.

Parameters
string$schema_idThe {schema_id} slug from the HTTP request.
string$identifierIdentifier.
\Symfony\Component\HttpFoundation\Request$requestThe request object.
Returns
\Symfony\Component\HttpFoundation\JsonResponse The json response.

Definition at line 289 of file MetastoreController.php.

◆ post()

Drupal\metastore\Controller\MetastoreController::post ( string  $schema_id,
Request  $request 
)

Implements POST method.

Parameters
string$schema_idThe {schema_id} slug from the HTTP request.
\Symfony\Component\HttpFoundation\Request$requestThe request object.
Returns
\Symfony\Component\HttpFoundation\JsonResponse The json response.

Definition at line 192 of file MetastoreController.php.

◆ publish()

Drupal\metastore\Controller\MetastoreController::publish ( string  $schema_id,
string  $identifier,
Request  $request 
)

Publish the latest revision of a dataset.

Parameters
string$schema_idThe {schema_id} slug from the HTTP request.
string$identifierIdentifier.
\Symfony\Component\HttpFoundation\Request$requestThe request object.
Returns
\Symfony\Component\HttpFoundation\JsonResponse The json response.

Definition at line 224 of file MetastoreController.php.

◆ put()

Drupal\metastore\Controller\MetastoreController::put (   $schema_id,
string  $identifier,
Request  $request 
)

Implements PUT method.

Parameters
string$schema_idThe {schema_id} slug from the HTTP request.
string$identifierIdentifier.
\Symfony\Component\HttpFoundation\Request$requestThe request object.
Returns
\Symfony\Component\HttpFoundation\JsonResponse The json response.

Definition at line 253 of file MetastoreController.php.