src/snapchat.php
public function getSnaps() {
		$updates = $this->getUpdates();

		if (empty($updates)) {
			return FALSE;
		}

		// We'll make these a little more readable.
		$snaps = array();
		foreach ($updates->snaps as $snap) {
			$snaps[] = (object) array(
				'id' => $snap->id,
				'media_id' => empty($snap->c_id) ? FALSE : $snap->c_id,
				'media_type' => $snap->m,
				'time' => empty($snap->t) ? FALSE : $snap->t,
				'sender' => empty($snap->sn) ? $this->username : $snap->sn,
				'recipient' => empty($snap->rp) ? $this->username : $snap->rp,
				'status' => $snap->st,
				'screenshot_count' => empty($snap->c) ? 0 : $snap->c,
				'sent' => $snap->sts,
				'opened' => $snap->ts,
				'broadcast' => empty($snap->broadcast) ? FALSE : (object) array(
					'url' => $snap->broadcast_url,
					'action_text' => $snap->broadcast_action_text,
					'hide_timer' => $snap->broadcast_hide_timer,
				),
			);
		}

		return $snaps;
	}
public function getSnaps() {
		$updates = $this->getUpdates();

		if (empty($updates)) {
			return FALSE;
		}

		// We'll make these a little more readable.
		$snaps = array();
		foreach ($updates->snaps as $snap) {
			$snaps[] = (object) array(
				'id' => $snap->id,
				'media_id' => empty($snap->c_id) ? FALSE : $snap->c_id,
				'media_type' => $snap->m,
				'time' => empty($snap->t) ? FALSE : $snap->t,
				'sender' => empty($snap->sn) ? $this->username : $snap->sn,
				'recipient' => empty($snap->rp) ? $this->username : $snap->rp,
				'status' => $snap->st,
				'screenshot_count' => empty($snap->c) ? 0 : $snap->c,
				'sent' => $snap->sts,
				'opened' => $snap->ts,
				'broadcast' => empty($snap->broadcast) ? FALSE : (object) array(
					'url' => $snap->broadcast_url,
					'action_text' => $snap->broadcast_action_text,
					'hide_timer' => $snap->broadcast_hide_timer,
				),
			);
		}

		return $snaps;
	}
public function getSnaps ( ) { $ updates = $ this -> getUpdates ( ) ; if ( empty ( $ updates ) ) { return FALSE ; } // We'll make these a little more readable. $ snaps = array ( ) ; foreach ( $ updates -> snaps as $ snap ) { $ snaps [ ] = ( object ) array ( 'id' => $ snap -> id , 'media_id' => empty ( $ snap -> c_id ) ? FALSE : $ snap -> c_id , 'media_type' => $ snap -> m , 'time' => empty ( $ snap -> t ) ? FALSE : $ snap -> t , 'sender' => empty ( $ snap -> sn ) ? $ this -> username : $ snap -> sn , 'recipient' => empty ( $ snap -> rp ) ? $ this -> username : $ snap -> rp , 'status' => $ snap -> st , 'screenshot_count' => empty ( $ snap -> c ) ? 0 : $ snap -> c , 'sent' => $ snap -> sts , 'opened' => $ snap -> ts , 'broadcast' => empty ( $ snap -> broadcast ) ? FALSE : ( object ) array ( 'url' => $ snap -> broadcast_url , 'action_text' => $ snap -> broadcast_action_text , 'hide_timer' => $ snap -> broadcast_hide_timer , ) , ) ; } return $ snaps ; }
Gets the user's snaps.

@return mixed
An array of snaps or FALSE on failure.
Gets the user s snaps .