Skip to content

Latest commit

 

History

History
240 lines (163 loc) · 6.26 KB

MediaLibraryApiInterface.md

File metadata and controls

240 lines (163 loc) · 6.26 KB

OpenAPI\Server\Api\MediaLibraryApiInterface

All URIs are relative to https://share.catrob.at/api

Method HTTP request Description
mediaFileIdGet GET /media/file/{id} Get the information of a specific media file
mediaFilesGet GET /media/files Get all content of the media library.
mediaFilesSearchGet GET /media/files/search Search for mediafiles associated with keywords
mediaPackageNameGet GET /media/package/{name} Get media-library asstes of a named package

Service Declaration

# src/Acme/MyBundle/Resources/services.yml
services:
    # ...
    acme.my_bundle.api.mediaLibrary:
        class: Acme\MyBundle\Api\MediaLibraryApi
        tags:
            - { name: "open_api_server.api", api: "mediaLibrary" }
    # ...

mediaFileIdGet

OpenAPI\Server\Model\MediaFileResponse mediaFileIdGet($id)

Get the information of a specific media file

Example Implementation

<?php
// src/Acme/MyBundle/Api/MediaLibraryApiInterface.php

namespace Acme\MyBundle\Api;

use OpenAPI\Server\Api\MediaLibraryApiInterface;

class MediaLibraryApi implements MediaLibraryApiInterface
{

    // ...

    /**
     * Implementation of MediaLibraryApiInterface#mediaFileIdGet
     */
    public function mediaFileIdGet(int $id)
    {
        // Implement the operation ...
    }

    // ...
}

Parameters

Name Type Description Notes
id int ID of any given media file

Return type

OpenAPI\Server\Model\MediaFileResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

mediaFilesGet

OpenAPI\Server\Model\MediaFileResponse mediaFilesGet($limit, $offset, $flavor)

Get all content of the media library.

Example Implementation

<?php
// src/Acme/MyBundle/Api/MediaLibraryApiInterface.php

namespace Acme\MyBundle\Api;

use OpenAPI\Server\Api\MediaLibraryApiInterface;

class MediaLibraryApi implements MediaLibraryApiInterface
{

    // ...

    /**
     * Implementation of MediaLibraryApiInterface#mediaFilesGet
     */
    public function mediaFilesGet(int $limit = '20', int $offset = '0', string $flavor = null)
    {
        // Implement the operation ...
    }

    // ...
}

Parameters

Name Type Description Notes
limit int [optional] [default to 20]
offset int [optional] [default to 0]
flavor string [optional]

Return type

OpenAPI\Server\Model\MediaFileResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

mediaFilesSearchGet

OpenAPI\Server\Model\MediaFileResponse mediaFilesSearchGet($query, $flavor, $limit, $offset, $package_name)

Search for mediafiles associated with keywords

Example Implementation

<?php
// src/Acme/MyBundle/Api/MediaLibraryApiInterface.php

namespace Acme\MyBundle\Api;

use OpenAPI\Server\Api\MediaLibraryApiInterface;

class MediaLibraryApi implements MediaLibraryApiInterface
{

    // ...

    /**
     * Implementation of MediaLibraryApiInterface#mediaFilesSearchGet
     */
    public function mediaFilesSearchGet(string $query, string $flavor = null, int $limit = '20', int $offset = '0', string $package_name = null)
    {
        // Implement the operation ...
    }

    // ...
}

Parameters

Name Type Description Notes
query string
flavor string [optional]
limit int [optional] [default to 20]
offset int [optional] [default to 0]
package_name string In which package you want to search (for more fine tuned results) [optional]

Return type

OpenAPI\Server\Model\MediaFileResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

mediaPackageNameGet

OpenAPI\Server\Model\MediaFileResponse mediaPackageNameGet($name, $limit, $offset)

Get media-library asstes of a named package

Example Implementation

<?php
// src/Acme/MyBundle/Api/MediaLibraryApiInterface.php

namespace Acme\MyBundle\Api;

use OpenAPI\Server\Api\MediaLibraryApiInterface;

class MediaLibraryApi implements MediaLibraryApiInterface
{

    // ...

    /**
     * Implementation of MediaLibraryApiInterface#mediaPackageNameGet
     */
    public function mediaPackageNameGet(string $name, int $limit = '20', int $offset = '0')
    {
        // Implement the operation ...
    }

    // ...
}

Parameters

Name Type Description Notes
name string Name of the package
limit int [optional] [default to 20]
offset int [optional] [default to 0]

Return type

OpenAPI\Server\Model\MediaFileResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]