예제 #1
0
 /**
  * Getting the crawl error counts
  *
  * @param string $profile Profile name string.
  *
  * @return object|bool
  */
 private function get_crawl_error_counts($profile)
 {
     $crawl_error_counts = $this->client->do_request('sites/' . urlencode($profile) . '/urlCrawlErrorsCounts/query', true);
     if (!empty($crawl_error_counts)) {
         return $crawl_error_counts;
     }
     return false;
 }
예제 #2
0
 /**
  * When authorization is successful return true, otherwise false
  *
  * @param string                  $authorization_code
  * @param Yoast_Api_Google_Client $client
  *
  * @return bool
  */
 public static function validate_authorization($authorization_code, Yoast_Api_Google_Client $client)
 {
     return $authorization_code !== '' && $client->authenticate_client($authorization_code);
 }