Urlaubsplan
Lade ...
Suche ...
Keine Treffer
App::Controllers::Api::HolidayApiController Klassenreferenz
Klassendiagramm für App::Controllers::Api::HolidayApiController:
Zusammengehörigkeiten von App::Controllers::Api::HolidayApiController:

Öffentliche Methoden

 __construct ()
 

Öffentliche Attribute

path : "/api/holidays/{userID}"
 HTTP-spezifischer Kontext.
 
path tags: ["Holidays"]
 
path summary: "Retrieve all holidays for a user"
 
path parameters: [ new OA\Parameter( name: "userID"
 
path in: "path"
 
path required: true
 
path description: "User ID"
 
path schema: new OA\Schema(type: "integer"
 
path example: 1) ) ]
 
path responses: [ new OA\Response( response: 200
 
path content: new OA\JsonContent( properties: [ new OA\Property(property: "user"
 
path type: "object"
 
path : "/api/holidays"
 HTTP-spezifischer Kontext.
 
path requestBody: new OA\RequestBody( required: true
 
path new OA Property(property:"start_date", type:"string", example:"2024-01-01") new OA Property(property:"end_date", type:"string", example:"2024-01-10") new OA Property(property:"type", type:"string", example:"annual") new OA Property(property:"status", type:"string", example:"pending")])) responses: [ new OA\Response( response: 201
 
path new OA Property(property:"start_date", type:"string", example:"2024-01-01") new OA Property(property:"end_date", type:"string", example:"2024-01-10") new OA Property(property:"type", type:"string", example:"annual") new OA Property(property:"status", type:"string", example:"pending")]) description: "Holiday added successfully"
 
path new OA Property(property:"start_date", type:"string", example:"2024-01-01") new OA Property(property:"end_date", type:"string", example:"2024-01-10") new OA Property(property:"type", type:"string", example:"annual") new OA Property(property:"status", type:"string", example:"pending")] content: new OA\JsonContent( properties: [ new OA\Property(property: "status"
 
path new OA Property(property:"start_date", type:"string", example:"2024-01-01") new OA Property(property:"end_date", type:"string", example:"2024-01-10") new OA Property(property:"type", type:"string", example:"annual") new OA Property(property:"status", type:"string", example:"pending")] type: "string"
 
path new OA Property(property:"start_date", type:"string", example:"2024-01-01") new OA Property(property:"end_date", type:"string", example:"2024-01-10") new OA Property(property:"type", type:"string", example:"annual") new OA Property(property:"status", type:"string", example:"pending")] example: "success")
 

Geschützte Attribute

 $modelName = 'App\Models\HolidayModel'
 
 $format = 'json'
 

Propertys

UrlaubModel Response [get, set]
 
 $events = $urlaubModel->getAllUrlaub($userID)
 

Ausführliche Beschreibung

HolidayApiController

Controller zur Verwaltung von Urlaubsanträgen und -informationen.

Dokumentation der Elementfunktionen

◆ __construct()

App::Controllers::Api::HolidayApiController::__construct ( )

Konstruktor zur globalen Rollenprüfung

Dokumentation der Datenelemente

◆ $format

App::Controllers::Api::HolidayApiController::$format = 'json'
protected

◆ $modelName

App::Controllers::Api::HolidayApiController::$modelName = 'App\Models\HolidayModel'
protected

◆ __pad0__

path App::Controllers::Api::HolidayApiController::__pad0__

HTTP-spezifischer Kontext.

Liste aller Urlaube eines Benutzers abrufen.

Parameter
int | null$userIDID des Benutzers
Rückgabe
Namespace: CodeIgniter
JSON-Antwort mit den Urlaubsdaten

API-Endpunkt {get} /api/holidays/:userID Urlaubsübersicht abrufen

API Name: \1 GetHolidayList
API Group: \1 Holidays
API Parameter: \1 {Number} userID Die ID des Benutzers
API Success: \1 {Object} user Informationen über den Benutzer und seine Urlaube
API Error: \1 404 Keine Daten gefunden

◆ __pad1__

path App::Controllers::Api::HolidayApiController::__pad1__

HTTP-spezifischer Kontext.

Fügt einen neuen Urlaubseintrag hinzu.

Rückgabe
Namespace: CodeIgniter
JSON-Antwort mit Erfolgsmeldung oder Fehler

API-Endpunkt {post} /api/holidays Urlaub hinzufügen

API Name: \1 AddHoliday
API Group: \1 Holidays
API Parameter: \1 {Number} user_id Die ID des Benutzers
API Parameter: \1 {String} start_date Startdatum des Urlaubs
API Parameter: \1 {String} end_date Enddatum des Urlaubs
API Parameter: \1 {String} type Typ des Urlaubs (z.B. "annual", "sick")
API Parameter: \1 {String} status Status des Antrags (z.B. "pending", "approved")
API Success: \1 {Object} data Die Daten des hinzugefügten Urlaubs
API Error: \1 400 Fehlerhafte Eingabe

◆ content [1/2]

path App::Controllers::Api::HolidayApiController::content

◆ content [2/2]

path new OA Property(property:"start_date", type:"string", example:"2024-01-01") new OA Property(property:"end_date", type:"string", example:"2024-01-10") new OA Property(property:"type", type:"string", example:"annual") new OA Property (property:"status", type:"string", example:"pending")] App::Controllers::Api::HolidayApiController::content

◆ description [1/2]

path App::Controllers::Api::HolidayApiController::description

◆ description [2/2]

path new OA Property(property:"start_date", type:"string", example:"2024-01-01") new OA Property(property:"end_date", type:"string", example:"2024-01-10") new OA Property(property:"type", type:"string", example:"annual") new OA Property (property:"status", type:"string", example:"pending")]) App::Controllers::Api::HolidayApiController::description

◆ example [1/2]

path App::Controllers::Api::HolidayApiController::example

◆ example [2/2]

path new OA Property(property:"start_date", type:"string", example:"2024-01-01") new OA Property(property:"end_date", type:"string", example:"2024-01-10") new OA Property(property:"type", type:"string", example:"annual") new OA Property (property:"status", type:"string", example:"pending")] App::Controllers::Api::HolidayApiController::example

◆ in

path App::Controllers::Api::HolidayApiController::in

◆ parameters

path App::Controllers::Api::HolidayApiController::parameters

◆ requestBody

path App::Controllers::Api::HolidayApiController::requestBody

◆ required

path App::Controllers::Api::HolidayApiController::required

◆ responses [1/2]

path App::Controllers::Api::HolidayApiController::responses

◆ responses [2/2]

path new OA Property(property:"start_date", type:"string", example:"2024-01-01") new OA Property(property:"end_date", type:"string", example:"2024-01-10") new OA Property(property:"type", type:"string", example:"annual") new OA Property (property:"status", type:"string", example:"pending")])) App::Controllers::Api::HolidayApiController::responses

◆ schema

path App::Controllers::Api::HolidayApiController::schema

◆ summary

path App::Controllers::Api::HolidayApiController::summary

◆ tags

path App::Controllers::Api::HolidayApiController::tags

◆ type [1/2]

path App::Controllers::Api::HolidayApiController::type

◆ type [2/2]

path new OA Property(property:"start_date", type:"string", example:"2024-01-01") new OA Property(property:"end_date", type:"string", example:"2024-01-10") new OA Property(property:"type", type:"string", example:"annual") new OA Property (property:"status", type:"string", example:"pending")] App::Controllers::Api::HolidayApiController::type

Dokumentation der Propertys

◆ $events

App::Controllers::Api::HolidayApiController::$events = $urlaubModel->getAllUrlaub($userID)

◆ Response

UrlaubModel App::Controllers::Api::HolidayApiController::Response
getsetproperty

Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Datei: