Open Data Catalog v2.0.0
Drupal\dkan_metastore\WebServiceApi Class Reference
Inheritance diagram for Drupal\dkan_metastore\WebServiceApi:

Public Member Functions

 __construct (RequestStack $requestStack, Service $service)
 
 getSchemas ()
 
 getSchema (string $identifier)
 
 getAll (string $schema_id)
 
 get (string $schema_id, string $identifier)
 
 getResources (string $schema_id, string $identifier)
 
 post (string $schema_id)
 
 put ($schema_id, string $identifier)
 
 patch ($schema_id, $identifier)
 
 delete ($schema_id, $identifier)
 
 getCatalog ()
 

Static Public Member Functions

static create (ContainerInterface $container)
 

Detailed Description

Class Api.

Todo:
Move docs stuff.

Definition at line 20 of file WebServiceApi.php.

Constructor & Destructor Documentation

◆ __construct()

Drupal\dkan_metastore\WebServiceApi::__construct ( RequestStack  $requestStack,
Service  $service 
)

Constructor.

Definition at line 52 of file WebServiceApi.php.

Member Function Documentation

◆ create()

static Drupal\dkan_metastore\WebServiceApi::create ( ContainerInterface  $container)
static

Inherited.

Definition at line 42 of file WebServiceApi.php.

◆ delete()

Drupal\dkan_metastore\WebServiceApi::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 217 of file WebServiceApi.php.

◆ get()

Drupal\dkan_metastore\WebServiceApi::get ( string  $schema_id,
string  $identifier 
)

Implements GET 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 95 of file WebServiceApi.php.

◆ getAll()

Drupal\dkan_metastore\WebServiceApi::getAll ( string  $schema_id)

Get all.

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

Definition at line 80 of file WebServiceApi.php.

◆ getCatalog()

Drupal\dkan_metastore\WebServiceApi::getCatalog ( )

Provides the data catalog.

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

Definition at line 233 of file WebServiceApi.php.

◆ getResources()

Drupal\dkan_metastore\WebServiceApi::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 116 of file WebServiceApi.php.

◆ getSchema()

Drupal\dkan_metastore\WebServiceApi::getSchema ( string  $identifier)

Get schema.

Definition at line 67 of file WebServiceApi.php.

◆ getSchemas()

Drupal\dkan_metastore\WebServiceApi::getSchemas ( )

Get schemas.

Definition at line 60 of file WebServiceApi.php.

◆ patch()

Drupal\dkan_metastore\WebServiceApi::patch (   $schema_id,
  $identifier 
)

Implements PATCH 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 190 of file WebServiceApi.php.

◆ post()

Drupal\dkan_metastore\WebServiceApi::post ( string  $schema_id)

Implements POST method.

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

Definition at line 134 of file WebServiceApi.php.

◆ put()

Drupal\dkan_metastore\WebServiceApi::put (   $schema_id,
string  $identifier 
)

Implements PUT 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 163 of file WebServiceApi.php.