Skip to content

Latest commit

 

History

History
executable file
·
230 lines (155 loc) · 6 KB

NotificationsApiInterface.md

File metadata and controls

executable file
·
230 lines (155 loc) · 6 KB

OpenAPI\Server\Api\NotificationsApiInterface

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

Method HTTP request Description
notificationIdReadPut PUT /notification/{id}/read Mark specified notification as read
notificationsCountGet GET /notifications/count Count the number of unseen notifications
notificationsGet GET /notifications Get user notifications -- StatusCode: 501 - Not yet implemented
notificationsReadPut PUT /notifications/read Mark all notifications as read

Service Declaration

# config/services.yaml
services:
    # ...
    Acme\MyBundle\Api\NotificationsApi:
        tags:
            - { name: "open_api_server.api", api: "notifications" }
    # ...

notificationIdReadPut

notificationIdReadPut($id, $accept_language)

Mark specified notification as read

Example Implementation

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

namespace Acme\MyBundle\Api;

use OpenAPI\Server\Api\NotificationsApiInterface;

class NotificationsApi implements NotificationsApiInterface
{

    // ...

    /**
     * Implementation of NotificationsApiInterface#notificationIdReadPut
     */
    public function notificationIdReadPut(int $id, string $accept_language, int &$responseCode, array &$responseHeaders): void
    {
        // Implement the operation ...
    }

    // ...
}

Parameters

Name Type Description Notes
id int [default to 0]
accept_language string [optional] [default to 'en']

Return type

void (empty response body)

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

notificationsCountGet

OpenAPI\Server\Model\NotificationsCountResponse notificationsCountGet()

Count the number of unseen notifications

Example Implementation

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

namespace Acme\MyBundle\Api;

use OpenAPI\Server\Api\NotificationsApiInterface;

class NotificationsApi implements NotificationsApiInterface
{

    // ...

    /**
     * Implementation of NotificationsApiInterface#notificationsCountGet
     */
    public function notificationsCountGet(int &$responseCode, array &$responseHeaders): array|object|null
    {
        // Implement the operation ...
    }

    // ...
}

Parameters

This endpoint does not need any parameter.

Return type

OpenAPI\Server\Model\NotificationsCountResponse

Authorization

BearerAuth

HTTP request headers

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

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

notificationsGet

OpenAPI\Server\Model\NotificationResponse notificationsGet($accept_language, $limit, $offset, $attributes, $type)

Get user notifications -- StatusCode: 501 - Not yet implemented

Example Implementation

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

namespace Acme\MyBundle\Api;

use OpenAPI\Server\Api\NotificationsApiInterface;

class NotificationsApi implements NotificationsApiInterface
{

    // ...

    /**
     * Implementation of NotificationsApiInterface#notificationsGet
     */
    public function notificationsGet(string $accept_language, int $limit, int $offset, string $attributes, string $type, int &$responseCode, array &$responseHeaders): array|object|null
    {
        // Implement the operation ...
    }

    // ...
}

Parameters

Name Type Description Notes
accept_language string [optional] [default to 'en']
limit int [optional] [default to 20]
offset int [optional] [default to 0]
attributes string [optional] [default to '']
type string [optional] [default to 'all']

Return type

OpenAPI\Server\Model\NotificationResponse

Authorization

BearerAuth

HTTP request headers

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

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

notificationsReadPut

notificationsReadPut()

Mark all notifications as read

Example Implementation

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

namespace Acme\MyBundle\Api;

use OpenAPI\Server\Api\NotificationsApiInterface;

class NotificationsApi implements NotificationsApiInterface
{

    // ...

    /**
     * Implementation of NotificationsApiInterface#notificationsReadPut
     */
    public function notificationsReadPut(int &$responseCode, array &$responseHeaders): void
    {
        // Implement the operation ...
    }

    // ...
}

Parameters

This endpoint does not need any parameter.

Return type

void (empty response body)

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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