Skip to content

Commit 6625369

Browse files
Joey Kudishdereksmart
Joey Kudish
authored andcommitted
REST API: update references to keyring tokens to be keyring connections
Per discussion at Automattic/calypso-pre-oss#3179, authorization tokens to third-party services are stored as "Keyring tokens", but the API endpoints return related information and not the token itself. Referring to these objects as tokens in the API leads to confusion, as there is indeed an underlying token, but the object itself is a descriptor for that token. Therefore, we're updating the Keyring and Publicize endpoints to refer to these objects as Keyring connections. see Automattic/calypso-pre-oss#3179, Automattic/calypso-pre-oss#3338 and Automattic/calypso-pre-oss#3207 Merges r111817-wpcom.
1 parent 237e42a commit 6625369

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

class.json-api-endpoints.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1472,11 +1472,11 @@ function get_publicize_connection_link( $blog_id, $publicize_connection_id, $pat
14721472
}
14731473

14741474
function get_publicize_connections_link( $keyring_token_id, $path = '' ) {
1475-
return $this->get_link( '.1/me/publicize-connections/?keyring_token_ID=%d', $keyring_token_id, $path );
1475+
return $this->get_link( '.1/me/publicize-connections/?keyring_connection_ID=%d', $keyring_token_id, $path );
14761476
}
14771477

1478-
function get_keyring_token_link( $keyring_token_id, $path = '' ) {
1479-
return $this->get_link( '.1/me/keyring-tokens/%d', $keyring_token_id, $path );
1478+
function get_keyring_connection_link( $keyring_token_id, $path = '' ) {
1479+
return $this->get_link( '.1/me/keyring-connections/%d', $keyring_token_id, $path );
14801480
}
14811481

14821482
function get_external_service_link( $external_service, $path = '' ) {

0 commit comments

Comments
 (0)