Get travel for yesterday.

@param int                $vehicleId
@param \Katsana\Sdk\Query $query

@return \Laravie\Codex\Contracts\Response
493941
public function yesterday(int $vehicleId): Response
    {
        $this->requiresAccessToken();

        return $this->send(
            'GET',
            "vehicles/{$vehicleId}/travels/summaries/yesterday",
            $this->getApiHeaders()
        );
    }
225431
public function retrieve($query)
	{
		// Eager load configured relationships.
		$query = $this->setEagerLoaded($query);

		// Execute the query.
		$retrieved = $query->get();

		// Eager load configured relationships.
		return $this->setLazyLoaded($retrieved);
	}
497711
public function getEpisodesWithQuery(int $id, array $query): PaginatedResults
    {
        $json = $this->parent->performAPICallWithJsonResponse(
            'get',
            '/series/'.$id.'/episodes/query',
            ['query' => $query]
        );

        return new PaginatedResults(
            DataParser::parseDataArray($json, BasicEpisode::class),
            $this->parent->getLastLinks()
        );
    }
1151965
public function route($route = null, array $params = array(), array $query = array())
    {
        return $this->toRoute($route, $params, $query);
    }
873648
public function query($query = NULL) {
        if (isset($query)) {
            $this->setQuery(self::cleanQuery($query));
            return $this;
        }
        return $this->getQuery();
    }
706707
private function doGenericQuery($query, $city, $parameters = [])
    {
        if (is_numeric($city)) {
            $parameters['id'] = $city;
        } else {
            $parameters['q'] = $city;
        }

        $response = $this->query($query, $parameters);

        return $response;
    }
737314
protected function cloneQuery(Query $query)
    {
        $aclAppliedQuery = clone $query;
        $params = $query->getParameters();
        /* @var $param Parameter */
        foreach ($params as $param) {
            $aclAppliedQuery->setParameter($param->getName(), $param->getValue(), $param->getType());
        }

        return $aclAppliedQuery;
    }
749516
public function duration(int $vehicleId, string $start, string $end, ?Query $query = null): Response
    {
        $this->requiresAccessToken();

        return $this->send(
            'GET',
            "vehicles/{$vehicleId}/travels/summaries/duration",
            $this->getApiHeaders(),
            \compact('start', 'end')
        );
    }
854486
public function withQuery($query)
    {
        if (!is_string($query) && !method_exists($query, '__toString')) {
            throw new InvalidArgumentException('Uri query must be a string');
        }
        $query = ltrim((string)$query, '?');
        $clone = clone $this;
        $clone->query = Validator::checkQuery($query);

        return $clone;
    }
1237230
public final function get(string $query, array $queryParams = null, string $fetchClass = null)
    {
        return $this->query($query, $queryParams, 1, $fetchClass)->getData(0);
    }
29066
public function queriedDelete(Query $query)
    {
        $identifier = $this->getIdentifier();
        $queryResult = $this->query($query);
        $deletedIds = [];

        foreach ($queryResult as $record) {
            try {
                $deletedRecord = $this->delete($record[$identifier]);
                $deletedIds[] = $deletedRecord[$identifier];
            } catch (\Throwable $e) {
                // TODO: need to log record that was not deleted
                continue;
            }
        }

        return $deletedIds;
    }
8417
public function query($query, $map = [])
    {
        $statement = parent::exec($query, $map);
        $lastSQL = parent::last();
        Container::get('logger')->info($lastSQL);
        array_push(self::$queries, $lastSQL);
        return $statement;
    }
23785
public function apply(Query $query) : Query
    {
        return $query->where(
            (new QueryExpression())->gt(
                $this->field,
                $this->value,
                $query->getTypeMap()->type($this->field)
            )
        );
    }
475864
public function get($number, $query, array $bindings = null, $time = null)
    {
        // for Laravel/Lumen 5.2+ $query is object and it holds all the data
        if ($this->version->min('5.2.0')) {
            $bindings = $query->bindings;
            $time = $query->time;
            $query = $query->sql;
        }

        return new SqlQuery($number, $query, $bindings, $time);
    }
164406
public static function mergeQuery($uri, $query)
    {
        return $uri->withQuery((string) (new Query(self::filterUri($uri)->getQuery()))->merge($query));
    }
792136
public function qualifyCollectionQuery($query)
    {
        $user = auth()->user();

        $modelPolicy = Gate::getPolicyFor(static::$model);

        // If no policy exists for this model, then there's nothing to check
        if (is_null($modelPolicy)) {
            return $query;
        }

        // Add conditions to the query, if they are defined in the model's policy
        if (method_exists($modelPolicy, 'qualifyCollectionQueryWithUser')) {
            $query = $modelPolicy->qualifyCollectionQueryWithUser($user, $query);
        }

        return $query;
    }
965305
public function getData(Query $query = NULL) {
		$rs = NULL;

		if ($query === NULL) {
			$query = new Query();
		}

		if ($query->readCache) {
			$rs = $this->cache->get($this->getkey($query));
			if ($rs !== NULL) {
				return $rs;
			}
		}

		// 这里，将获取耗性能的数据
		$rs = $this->doGetData($query);

		if ($query->writeCache) {
			$this->cache->set($this->getKey($query), $rs, $this->getExpire($query));
		}

		return $rs;
	}