From ca3e6ec0005c2729280af88280e81878cca2a181 Mon Sep 17 00:00:00 2001 From: mgp25 Date: Wed, 2 Sep 2015 19:43:20 +0200 Subject: [PATCH] Added IP Routing --- src/snapchat.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/snapchat.php b/src/snapchat.php index 7e70447..668e484 100644 --- a/src/snapchat.php +++ b/src/snapchat.php @@ -457,6 +457,34 @@ public function login($password, $force = FALSE) } } + /** + * IP Routing + */ + public function ipRouting() + { + // 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/ip_routing', + array( + 'ip_routing_key' => '{"https:\/\/feelinsonice-hrd.appspot.com":"https:\/\/feelinsonice-hrd.appspot.com"}', + 'timestamp' => $timestamp, + 'username' => $this->username + ), + array( + $this->auth_token, + $timestamp, + ), + $multipart = false, + $debug = $this->debug + ); + } + /** * Logs out the current user. *