diff --git a/src/snapchat.php b/src/snapchat.php index 1af869d..b658708 100644 --- a/src/snapchat.php +++ b/src/snapchat.php @@ -137,6 +137,8 @@ public function device() return $result; } + + public function getAttestation($password, $timestamp) { $binary = file_get_contents("https://api.casper.io/droidguard/create/binary"); @@ -3054,7 +3056,7 @@ public function updatePrivacy($setting) $timestamp = parent::timestamp(); $result = parent::post( - '/bq/settings', + '/ph/settings', array( 'action' => 'updatePrivacy', 'privacySetting' => $setting, @@ -3072,6 +3074,35 @@ public function updatePrivacy($setting) return isset($result->param) && $result->param == $setting; } + public function updateStoryPrivacy($setting = "EVERYONE") + { + if(!$this->auth_token || !$this->username) + { + return FALSE; + } + + $setting = strcasecmp($setting, "everyone") ? "EVERYONE" : strcasecmp($setting, "friends") ? "FRIENDS" : "EVERYONE"; + + $timestamp = parent::timestamp(); + $result = parent::post( + "/ph/settings", + array( + "action" => "updateStoryPrivacy", + "privacySetting" => $setting, + "timestamp" => $timestamp, + "username" => $this->username + ), + array( + $this->auth_token, + $timestamp, + ), + $multipart = false, + $debug = $this->debug + ); + + return isset($result->param) && $result->param == $setting; + } + /** * Updates the current user's email address. *