src/snapchat.php
public function markSnapViewed($id, $time = 1) {
		$snap_info = array(
			$id => array(
				// Here Snapchat saw fit to use time as a float instead of
				// straight milliseconds.
				't' => microtime(TRUE),
				// We add a small variation here just to make it look more
				// realistic.
				'sv' => $time + (mt_rand() / mt_getrandmax() / 10),
			),
		);

		$events = array(
			array(
				'eventName' => 'SNAP_VIEW',
				'params' => array(
					'id' => $id,
					// There are others, but it wouldn't be worth the effort to
					// put them in here since they likely don't matter.
				),
				'ts' => time() - $time,
			),
			array(
				'eventName' => 'SNAP_EXPIRED',
				'params' => array(
					'id' => $id,
				),
				'ts' => time()
			),
		);

		return $this->sendEvents($events, $snap_info);
	}
public function markSnapViewed($id, $time = 1) {
		$snap_info = array(
			$id => array(
				// Here Snapchat saw fit to use time as a float instead of
				// straight milliseconds.
				't' => microtime(TRUE),
				// We add a small variation here just to make it look more
				// realistic.
				'sv' => $time + (mt_rand() / mt_getrandmax() / 10),
			),
		);

		$events = array(
			array(
				'eventName' => 'SNAP_VIEW',
				'params' => array(
					'id' => $id,
					// There are others, but it wouldn't be worth the effort to
					// put them in here since they likely don't matter.
				),
				'ts' => time() - $time,
			),
			array(
				'eventName' => 'SNAP_EXPIRED',
				'params' => array(
					'id' => $id,
				),
				'ts' => time()
			),
		);

		return $this->sendEvents($events, $snap_info);
	}
public function markSnapViewed ( $ id , $ time = 1 ) { $ snap_info = array ( $ id => array ( // Here Snapchat saw fit to use time as a float instead of // straight milliseconds. 't' => microtime ( TRUE ) , // We add a small variation here just to make it look more // realistic. 'sv' => $ time + ( mt_rand ( ) / mt_getrandmax ( ) / 10 ) , ) , ) ; $ events = array ( array ( 'eventName' => 'SNAP_VIEW' , 'params' => array ( 'id' => $ id , // There are others, but it wouldn't be worth the effort to // put them in here since they likely don't matter. ) , 'ts' => time ( ) - $ time , ) , array ( 'eventName' => 'SNAP_EXPIRED' , 'params' => array ( 'id' => $ id , ) , 'ts' => time ( ) ) , ) ; return $ this -> sendEvents ( $ events , $ snap_info ) ; }
Marks a snap as viewed.

Snaps can be downloaded an (apparently) unlimited amount of times before
they are viewed. Once marked as viewed, they are deleted.

It's worth noting that it seems possible to mark others' snaps as viewed
as long as you know the ID. This hasn't been tested thoroughly, but it
could be useful if you send a snap that you immediately regret.

@param string $id
The snap to mark as viewed.
@param int $time
The amount of time (in seconds) the snap was viewed. Defaults to 1.

@return bool
TRUE if successful, FALSE otherwise.
Marks a snap as viewed .