Exemplo n.º 1
0
 /**
  * Alias endpoint API calls.
  *
  * @param array $params message to send to Segment
  * @return object Guzzle response object
  */
 public static function alias(array $params)
 {
     $validate = new Validate();
     $validate->alias($params);
     $message = $validate->addLibraryInfo($params);
     // Initialize Guzzle
     $client = new Client(['base_uri' => Segment::baseUrl(), 'timeout' => Segment::getTimeout(), 'auth' => [Segment::getApiKey(), ':']]);
     $apiConnection = new GuzzleRequest($client, 'alias/');
     $identify = new ApiService($apiConnection);
     return $identify->send($message);
 }
Exemplo n.º 2
0
 public function testTrackWithPreviousWithUserId()
 {
     $params = ['previousId' => '12345', 'userId' => 'user1235'];
     $validate = new Validate();
     $validate->alias($params);
 }