Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 1
ContentGenerationServiceRequest
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 1
 __construct
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2/**
3 * AI Content Generation Service Request class.
4 *
5 * @package NewfoldLabs\WP\Module\Onboarding
6 */
7
8namespace NewfoldLabs\WP\Module\Onboarding\Services\Ai\ContentGeneration;
9
10use NewfoldLabs\WP\Module\Onboarding\Services\Ai\AiServiceRequest;
11
12/**
13 * AI Content Generation Service Request Class
14 *
15 * Handles HTTP requests to the AI Content Generation API endpoint.
16 */
17class ContentGenerationServiceRequest extends AiServiceRequest {
18
19    /**
20     * The content generation endpoint.
21     *
22     * @var string
23     */
24    protected $api_path = 'content-generation/';
25
26    /**
27     * Constructor
28     *
29     * @param string $endpoint The content generation endpoint to use.
30     * @param array $body    Request body data.
31     * @param array $headers Additional headers to include in the request.
32     * @param string|null $url The URL to send the request to (Not recommended to override this).
33     */
34    public function __construct( string $endpoint, array $body, array $headers = array(), ?string $url = null ) {
35        $endpoint = $this->api_path . $endpoint;
36        parent::__construct( $endpoint, $body, $headers, $url );
37    }
38}