mirror of
https://github.com/10h30/wp-strava.git
synced 2026-07-11 18:56:18 +09:00
Switch calls to use Client ID instead of Access Token
This commit is contained in:
@@ -104,16 +104,16 @@ class WPStrava {
|
||||
* @param string $token Athlete token.
|
||||
* @return WPStrava_API
|
||||
*/
|
||||
public function get_api( $token = null ) {
|
||||
if ( ! $token ) {
|
||||
$token = $this->settings->get_default_token();
|
||||
public function get_api( $id = null ) {
|
||||
if ( ! $id ) {
|
||||
$id = $this->settings->get_default_id();
|
||||
}
|
||||
|
||||
if ( empty( $this->api[ $token ] ) ) {
|
||||
$this->api[ $token ] = new WPStrava_API( $token );
|
||||
if ( empty( $this->api[ $id ] ) ) {
|
||||
$this->api[ $id ] = new WPStrava_API( $id );
|
||||
}
|
||||
|
||||
return $this->api[ $token ];
|
||||
return $this->api[ $id ];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user