33namespace Trafiklab \Common \Model \Contract ;
44
55
6+ use Trafiklab \Common \Model \Exceptions \InvalidKeyException ;
7+ use Trafiklab \Common \Model \Exceptions \InvalidRequestException ;
8+ use Trafiklab \Common \Model \Exceptions \InvalidStoplocationException ;
9+ use Trafiklab \Common \Model \Exceptions \KeyRequiredException ;
10+ use Trafiklab \Common \Model \Exceptions \QuotaExceededException ;
11+ use Trafiklab \Common \Model \Exceptions \RequestTimedOutException ;
12+ use Trafiklab \Common \Model \Exceptions \ServiceUnavailableException ;
13+
614/**
715 * A PublicTransportApiWrapper wraps one or more TrafikLab APIs to use them in our SDK.
816 * These contracts define a small set of common features which should be interchangeable between wrappers and APIs.
@@ -50,6 +58,13 @@ public function setFindStopLocationApiKey(string $apiKey): void;
5058 * @param TimeTableRequest $timeTableRequest The request object containing the query parameters.
5159 *
5260 * @return TimeTableResponse The response from the API.
61+ * @throws InvalidKeyException
62+ * @throws InvalidRequestException
63+ * @throws InvalidStoplocationException
64+ * @throws KeyRequiredException
65+ * @throws QuotaExceededException
66+ * @throws RequestTimedOutException
67+ * @throws ServiceUnavailableException
5368 */
5469 public function getTimeTable (TimeTableRequest $ timeTableRequest ): TimeTableResponse ;
5570
@@ -59,16 +74,30 @@ public function getTimeTable(TimeTableRequest $timeTableRequest): TimeTableRespo
5974 * @param RoutePlanningRequest $routePlanningRequest The request object containing the query parameters.
6075 *
6176 * @return RoutePlanningResponse The response from the API.
77+ * @throws InvalidKeyException
78+ * @throws InvalidRequestException
79+ * @throws InvalidStoplocationException
80+ * @throws KeyRequiredException
81+ * @throws QuotaExceededException
82+ * @throws RequestTimedOutException
83+ * @throws ServiceUnavailableException
6284 */
6385 public function getRoutePlanning (RoutePlanningRequest $ routePlanningRequest ): RoutePlanningResponse ;
6486
6587
6688 /**
67- * Get a route-planning between two points .
89+ * Find a stop location based on (a part of) its name .
6890 *
69- * @param FindStopLocationRequest $findStopLocationRequest The request object containing the query parameters.
91+ * @param FindStopLocationRequest $request The request object containing the query parameters.
7092 *
7193 * @return FindStopLocationResponse The response from the API.
94+ * @throws InvalidKeyException
95+ * @throws InvalidRequestException
96+ * @throws InvalidStoplocationException
97+ * @throws KeyRequiredException
98+ * @throws QuotaExceededException
99+ * @throws RequestTimedOutException
100+ * @throws ServiceUnavailableException
72101 */
73- public function findStopLocation (FindStopLocationRequest $ findStopLocationRequest ): FindStopLocationResponse ;
102+ public function findStopLocation (FindStopLocationRequest $ request ): FindStopLocationResponse ;
74103}
0 commit comments