Skip to content

Commit 474eaaa

Browse files
authored
Merge pull request #3444 from Parsely/update/suggestions-api-base-url
2 parents d26b894 + b413a4f commit 474eaaa

7 files changed

+5
-16
lines changed

src/services/suggestions-api/class-suggestions-api-service.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
*
2020
* @since 3.17.0
2121
*
22-
* @link https://content-suggestions-api.parsely.net/prod/docs
23-
*
2422
* @phpstan-import-type Endpoint_Suggest_Brief_Options from Endpoints\Endpoint_Suggest_Brief
2523
* @phpstan-import-type Endpoint_Suggest_Headline_Options from Endpoints\Endpoint_Suggest_Headline
2624
* @phpstan-import-type Endpoint_Suggest_Linked_Reference_Options from Endpoints\Endpoint_Suggest_Linked_Reference
@@ -36,7 +34,7 @@ class Suggestions_API_Service extends Base_API_Service {
3634
* @return string
3735
*/
3836
public static function get_base_url(): string {
39-
return 'https://content-suggestions-api.parsely.net/prod';
37+
return 'https://suggestions-api.parsely.com';
4038
}
4139

4240
/**

src/services/suggestions-api/endpoints/class-endpoint-suggest-brief.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
*
1818
* @since 3.17.0
1919
*
20-
* @link https://content-suggestions-api.parsely.net/prod/docs#/default/suggest_brief_suggest_brief_post
21-
*
2220
* @phpstan-type Endpoint_Suggest_Brief_Options = array{
2321
* persona?: string,
2422
* style?: string,

src/services/suggestions-api/endpoints/class-endpoint-suggest-headline.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
*
1818
* @since 3.17.0
1919
*
20-
* @link https://content-suggestions-api.parsely.net/prod/docs#/default/suggest_headline_suggest_headline_post
21-
*
2220
* @phpstan-type Traffic_Source = array{
2321
* source: string,
2422
* weight: float

src/services/suggestions-api/endpoints/class-endpoint-suggest-inbound-link-positions.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
*
2020
* @since 3.19.0
2121
*
22-
* @link https://content-suggestions-api.parsely.net/prod/docs#/prototype/suggest_inbound_link_positions_suggest_inbound_link_positions_post
23-
*
2422
* @phpstan-type LinkPositionResponse = array{
2523
* anchor_texts: array<array{text: string, offset: int}>,
2624
* title: string,

src/services/suggestions-api/endpoints/class-endpoint-suggest-inbound-links.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
*
1919
* @since 3.19.0
2020
*
21-
* @link https://content-suggestions-api.parsely.net/prod/docs#/default/suggest_inbound_links_suggest_inbound_links_post
22-
*
2321
* @phpstan-type Endpoint_Suggest_Inbound_Links_Options = array{
2422
* max_items?: int,
2523
* url_exclusion_list?: array<string>,

src/services/suggestions-api/endpoints/class-endpoint-suggest-linked-reference.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
*
1919
* @since 3.17.0
2020
*
21-
* @link https://content-suggestions-api.parsely.net/prod/docs#/default/suggest_linked_reference_suggest_linked_reference_post
22-
*
2321
* @phpstan-type Traffic_Source = array{
2422
* source: string,
2523
* weight: float

src/services/suggestions-api/endpoints/class-suggestions-api-base-endpoint.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
*
1919
* @since 3.17.0
2020
*
21-
* @link https://content-suggestions-api.parsely.net/prod/docs
22-
*
2321
* @phpstan-import-type WP_HTTP_Response from Base_Service_Endpoint
2422
* @phpstan-import-type WP_HTTP_Request_Args from Base_Service_Endpoint
2523
*/
@@ -46,7 +44,10 @@ abstract class Suggestions_API_Base_Endpoint extends Base_Service_Endpoint {
4644
protected function get_request_options( string $method ): array {
4745
$options = array(
4846
'method' => $method,
49-
'headers' => array( 'Content-Type' => 'application/json; charset=utf-8' ),
47+
'headers' => array(
48+
'Content-Type' => 'application/json; charset=utf-8',
49+
'X-INTERNAL-SERVICE' => 'content-helper',
50+
),
5051
'data_format' => 'body',
5152
'timeout' => 90, //phpcs:ignore WordPressVIPMinimum.Performance.RemoteRequestTimeout.timeout_timeout
5253
'body' => '{}',

0 commit comments

Comments
 (0)