hostUrl ).trailingslashit( $this->apiPath ).trailingslashit( $this->version ); return $url; } public function set_api_url() { return $this->api_url_map(); } public function get_api_url( $endpoint = '' ) { $apiUrl = $this->set_api_url(); if( !empty( $endpoint ) ) { return $apiUrl.$endpoint; } else { return $apiUrl; } } public function getRemote( $url ) { $response = wp_remote_get( $url, array( 'timeout' => 120, 'httpversion' => '1.1', ) ); return $response; } } // End Class