From 2baa79e01e2bc3dc2aa8ad280be5c9ad3fa09241 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Sun, 6 Sep 2015 16:26:21 +0200 Subject: [PATCH] downloadProfileData Added --- src/snapchat.php | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/snapchat.php b/src/snapchat.php index 2936b48..7a2906b 100644 --- a/src/snapchat.php +++ b/src/snapchat.php @@ -1033,6 +1033,36 @@ public function getUpdates($force = TRUE) return $result; } + /** + * Download profile data + * + */ + public function downloadProfileData() + { + // Make sure we're logged in and have a valid access token. + if(!$this->auth_token || !$this->username) + { + return FALSE; + } + + $timestamp = parent::timestamp(); + $result = parent::post( + '/bq/download_profile_data', + array( + 'size' => 'MEDIUM', + 'username' => $this->username, + 'username_image' => $this->username + ), + array( + $this->auth_token, + $timestamp, + ), + $multipart = false, + $debug = $this->debug + ); + + return $result; + } /** * Gets the user's snaps. *