You are here

public static function ShareaholicUtilities::delete_api_key in Share Buttons, Related Posts, Content Analytics - Shareaholic 8

Same name and namespace in other branches
  1. 7.3 utilities.php \ShareaholicUtilities::delete_api_key()

Deletes the api key

1 call to ShareaholicUtilities::delete_api_key()
ShareaholicUtilities::destroy_settings in ./utilities.php
Deletes the settings option

File

./utilities.php, line 404

Class

ShareaholicUtilities

Code

public static function delete_api_key() {
  $payload = array(
    'site_id' => self::get_option('api_key'),
    'verification_key' => self::get_option('verification_key'),
  );
  $response = drupal_http_request(self::API_URL . '/integrations/plugin/delete', array(
    'method' => 'POST',
    'headers' => array(
      'Content-Type' => 'application/json',
    ),
    'data' => json_encode($payload),
  ));
}