Documentation
¶
Index ¶
Constants ¶
const ( // ParamSpEncId specifies the special encryption ID for the request, usually set to "0" for public requests. ParamSpEncId = "SpEncId" // ParamCoordOutputFormat sets the coordinate output format, with "EPSG:4326" being a common value for latitude and longitude. ParamCoordOutputFormat = "coordOutputFormat" // ParamDeleteAssignedStops indicates whether to exclude specific stops from the result. "1" to exclude, "0" to include. ParamDeleteAssignedStops = "deleteAssignedStops" // ParamLanguage specifies the language of the response. Common values include "de" for German. ParamLanguage = "language" // ParamLocationServerActive indicates if the location server is active. "1" for active, "0" for inactive. ParamLocationServerActive = "locationServerActive" // ParamOutputFormat specifies the format of the output. "rapidJSON" is an example for JSON formatted output. ParamOutputFormat = "outputFormat" // ParamUseRealtime specifies whether to use real-time data. "1" for yes, "0" for no. ParamUseRealtime = "useRealtime" // ParamNameSF specifies the stop or location name for which stop finder information is requested. // This parameter is used to identify the specific location or address the stop finder should search for. ParamNameSF = "name_sf" // ParamTypeSF specifies the type of location being searched for in the stop finder request. // It defines the category of the location such as "any", "stop", "street", etc. ParamTypeSF = "type_sf" )
Request params common for Journey and Arrival
const ( // ParamCalcOneDirection indicates whether to calculate routes in one direction only. Accepts "1" (true) or "0" (false). ParamCalcOneDirection = "calcOneDirection" // ParamChangeSpeed denotes the speed at which a user can change between different transport modes. Common values include "normal" and "fast". ParamChangeSpeed = "changeSpeed" // ParamComputationType defines the computation strategy for the trip, e.g., "sequence" for sequential trip planning. ParamComputationType = "computationType" // ParamCycleSpeed represents the cycling speed in km/h when a bicycle mode is selected. Example values might include "14" for 14 km/h. ParamCycleSpeed = "cycleSpeed" // ParamDeleteITPTWalk specifies whether to remove walking parts from the itinerary. "1" to remove, "0" to include. ParamDeleteITPTWalk = "deleteITPTWalk" // ParamDescWithElev indicates if the description should include elevation data. "1" for yes, "0" for no. ParamDescWithElev = "descWithElev" // ParamIllumTransfer specifies whether the transfer should be illuminated. "on" for illuminated transfers. ParamIllumTransfer = "illumTransfer" // ParamImparedOptionsActive activates options for impaired individuals. "1" for active, "0" for inactive. ParamImparedOptionsActive = "imparedOptionsActive" // ParamItOptionsActive activates itinerary options. "1" for active, "0" for inactive. ParamItOptionsActive = "itOptionsActive" // ParamItdDate sets the date for the trip request in format "YYYYMMDD". ParamItdDate = "itdDate" // ParamItdTime sets the time for the trip request in format "HHMM". ParamItdTime = "itdTime" // ParamMacroWebTrip specifies whether the web trip macro is used. "true" for yes, "false" for no. ParamMacroWebTrip = "macroWebTrip" // ParamNameDestination specifies the destination name or code in the request. ParamNameDestination = "name_destination" // ParamNameOrigin specifies the origin name or code in the request. ParamNameOrigin = "name_origin" // ParamNoElevationProfile indicates if the elevation profile should be omitted. "1" for yes, "0" for no. ParamNoElevationProfile = "noElevationProfile" // ParamNoElevationSummary indicates if the elevation summary should be omitted. "1" for yes, "0" for no. ParamNoElevationSummary = "noElevationSummary" // ParamOutputOptionsActive activates output options. "1" for active, "0" for inactive. ParamOutputOptionsActive = "outputOptionsActive" // ParamPtOptionsActive activates public transport options. "1" for active, "0" for inactive. ParamPtOptionsActive = "ptOptionsActive" // ParamRouteType specifies the type of route requested, e.g., "leasttime" for the fastest route. ParamRouteType = "routeType" // ParamSearchLimitMinutes sets the maximum number of minutes to search for a route. ParamSearchLimitMinutes = "searchLimitMinutes" // ParamSecurityOptionsActive activates security options for the trip. "1" for active, "0" for inactive. ParamSecurityOptionsActive = "securityOptionsActive" // ParamServerInfo includes server information in the response. "1" for yes, "0" for no. ParamServerInfo = "serverInfo" // ParamShowInterchanges specifies whether to show interchange options in the trip. "1" for yes, "0" for no. ParamShowInterchanges = "showInterchanges" // ParamTrITArrMOT specifies the mode of transport for arrival. "100" might represent a specific mode. ParamTrITArrMOT = "trITArrMOT" // ParamTrITArrMOTvalue specifies the value associated with the mode of transport for arrival. ParamTrITArrMOTvalue = "trITArrMOTvalue" // ParamTrITDepMOT specifies the mode of transport for departure. "100" might represent a specific mode. ParamTrITDepMOT = "trITDepMOT" // ParamTrITDepMOTvalue specifies the value associated with the mode of transport for departure. ParamTrITDepMOTvalue = "trITDepMOTvalue" // ParamTryToFindLocalityStops indicates whether to try finding locality stops. "1" for yes, "0" for no. ParamTryToFindLocalityStops = "tryToFindLocalityStops" // ParamTypeDestination specifies the type of the destination, e.g., "any" for any type. ParamTypeDestination = "type_destination" // ParamTypeOrigin specifies the type of the origin, e.g., "any" for any type. ParamTypeOrigin = "type_origin" // ParamUseElevationData specifies whether to use elevation data. "1" for yes, "0" for no. ParamUseElevationData = "useElevationData" // ParamUseLocalityMainStop specifies whether to use the main stop for a locality. "1" for yes, "0" for no. ParamUseLocalityMainStop = "useLocalityMainStop" // ParamUseUT specifies whether to use the universal time. "1" for yes, "0" for no. ParamUseUT = "useUT" // ParamVersion specifies the version of the API being used. ParamVersion = "version" // ParamWObjPrefAl specifies the preference for object allocation. Values are typically numeric. ParamWObjPrefAl = "w_objPrefAl" // ParamWRegPrefAm specifies the preference for regional amplitude. Values are typically numeric. ParamWRegPrefAm = "w_regPrefAm" )
Constants for VVS (Verkehrs- und Tarifverbund Stuttgart) API request parameters.
const ( // ParamLsShowTrainsExplicit indicates if trains should be explicitly shown. ParamLsShowTrainsExplicit = "lsShowTrainsExplicit" // ParamStateless indicates if the request should be stateless. ParamStateless = "stateless" // ParamAnySigWhenPerfectNoOtherMatches indicates if any significant matches should be shown when there's a perfect match. ParamAnySigWhenPerfectNoOtherMatches = "anySigWhenPerfectNoOtherMatches" // ParamLimit limits the number of results returned. ParamLimit = "limit" // ParamDepArr indicates the type of time reference (departure or arrival). ParamDepArr = "depArr" // ParamTypeDm specifies the type of demand (e.g., any). ParamTypeDm = "type_dm" // ParamAnyObjFilterDm is a filter used for objects in the request. ParamAnyObjFilterDm = "anyObjFilter_dm" // ParamNameDm is the name of the stop or location for which information is requested. ParamNameDm = "name_dm" // ParamMode specifies the mode of transportation. ParamMode = "mode" // ParamDmLineSelectionAll indicates if all lines should be selected. ParamDmLineSelectionAll = "dmLineSelectionAll" // ParamItdDateTimeDepArr specifies the time and type of the request (departure or arrival). ParamItdDateTimeDepArr = "itdDateTimeDepArr" // ParamItdDateYear specifies the year of the request date. ParamItdDateYear = "itdDateYear" // ParamItdDateMonth specifies the month of the request date. ParamItdDateMonth = "itdDateMonth" // ParamItdDateDay specifies the day of the request date. ParamItdDateDay = "itdDateDay" // ParamItdTimeHour specifies the hour of the request time. ParamItdTimeHour = "itdTimeHour" // ParamItdTimeMinute specifies the minute of the request time. ParamItdTimeMinute = "itdTimeMinute" // ParamItdTripDateTimeDepArr specifies the detailed time and date for departure or arrival. ParamItdTripDateTimeDepArr = "itdTripDateTimeDepArr" )
Constants for VVS API request parameters.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArrivalRequest ¶
ArrivalRequest represents the parameters required to request arrival information for a specific station or location.
Fields: - StationId (string): The unique identifier of the station for which arrival information is requested. This identifier should be recognized by the API. - TimeAt (*time.Time): Specifies the time at which arrival information is desired. If nil, the current time is assumed. - Limit (*int): Limits the number of arrival records returned in the response. If nil, a default limit set by the API is used. - LangCode (*string): Specifies the language of the response (e.g., "en" for English, "de" for German). If nil, the API's default language setting is used.
This struct is utilized to gather arrival times and related information for trains, buses, or other modes of transport at a specified station.
type ArrivalResponse ¶
type ArrivalResponse struct { Parameters []vvscommon.Parameter `json:"parameters"` DM vvscommon.DM `json:"dm"` Arr vvscommon.Arr `json:"arr"` DateTime vvscommon.DateTime `json:"dateTime"` DateRange []vvscommon.DateRange `json:"dateRange"` Option vvscommon.Option `json:"option"` ServingLines vvscommon.ServingLines `json:"servingLines"` ArrivalList []arrival.Arrival `json:"arrivalList"` }
ArrivalResponse encapsulates the response data for an API request querying arrival information.
Fields: - Parameters ([]vvscommon.Parameter): A list of parameters that were used in the request, providing context for the response. - DM (vvscommon.DM): Detailed information about the requested destination, including metadata. - Arr (vvscommon.Arr): Contains specific data related to the arrival query. - DateTime (vvscommon.DateTime): The date and time information relevant to the arrival request. - DateRange ([]vvscommon.DateRange): A list of date ranges applicable to the arrival information provided. - Option (vvscommon.Option): Options that were applied to the arrival request, such as filters or search criteria. - ServingLines (vvscommon.ServingLines): Information about the lines serving the queried station or location. - ArrivalList ([]arrival.Arrival): A comprehensive list of arrivals matching the request criteria, including details about each arrival.
ArrivalResponse provides a structured format for interpreting the data returned from an arrival information request to the API.
func GetArrivals ¶
func GetArrivals(r ArrivalRequest, reqParams ...ReqParam) (*ArrivalResponse, error)
GetArrivals sends a request to retrieve arrival information for a specified station or location. The function takes an ArrivalRequest struct containing essential request parameters and a variable number of ReqParam structs to specify additional request options.
Parameters: - r ArrivalRequest: A struct containing the base request parameters such as station ID and request time.
OrigId (string): The origin station identifier. Not used in this context but can be set for consistency.
DstId (string): The destination station identifier. This is typically the station ID for which arrivals are requested.
TimeAt (*time.Time): The specific date and time for which arrival information is requested. If nil, current time is assumed.
Limit (*int): The maximum number of arrival entries to retrieve. If nil, a default limit is applied.
LangCode (*string): The language code for the response (e.g., "de" for German). If nil, a default language is used.
reqParams ...ReqParam: Optional parameters to further customize the request. Each ReqParam consists of a Name and Value. Supported optional parameters (refer to constants for parameter names):
ParamLocationServerActive: Activates the location server for processing the request.
ParamLsShowTrainsExplicit: Specifies whether trains should be shown explicitly in the response.
ParamStateless: Indicates if the request should be processed without maintaining state.
ParamLanguage: Sets the language of the response.
ParamSpEncId: Security parameter, typically "0".
ParamAnySigWhenPerfectNoOtherMatches: Used to refine search results.
ParamLimit: Controls the maximum number of results returned.
ParamDepArr: Indicates whether departure or arrival times are requested ("arrival" for arrivals).
ParamTypeDm: Specifies the type of data management request.
ParamAnyObjFilterDm: Filters objects based on specified criteria.
ParamDeleteAssignedStops: Indicates whether assigned stops should be removed from the response.
ParamNameDm: The name or ID of the station for which arrivals are being requested.
ParamMode: Specifies the mode of transport.
ParamDmLineSelectionAll: Determines if all lines should be selected in the request.
ParamUseRealtime: Specifies whether real-time data should be used.
ParamOutputFormat: Defines the output format of the response.
ParamCoordOutputFormat: Sets the coordinate format for the response.
ParamItdDateTimeDepArr: Specifies the desired time for departure or arrival.
Additional parameters related to date and time of the request: ParamItdDateYear, ParamItdDateMonth, ParamItdDateDay, ParamItdTimeHour, ParamItdTimeMinute.
Returns: - (*ArrivalResponse, error): A pointer to an ArrivalResponse struct containing the requested arrival information, or an error if the request fails.
Example usage: response, err := GetArrivals(ArrivalRequest{DstId: "stationID", TimeAt: &time.Now()}, ReqParam{Name: ParamLimit, Value: "5"})
if err != nil { // handle error }
// process response
type DepartureRequest ¶
DepartureRequest represents the parameters required to request departure information for a specific station or location.
Fields: - StationId (string): The unique identifier for the station from which departure information is sought. This should correspond to an identifier known to the API. - TimeAt (*time.Time): Indicates the specific time for which departure information is requested. Defaults to the current time if nil. - Limit (*int): Controls the maximum number of departure entries to be included in the response. Uses a default value if nil. - LangCode (*string): Language code for the API response, such as "en" for English or "de" for German. Defaults to the API's standard language if nil.
Employed in obtaining information about scheduled departures from a particular station, including times, lines, and destinations.
type DepartureResponse ¶
type DepartureResponse struct { Parameters []vvscommon.Parameter `json:"parameters"` DM vvscommon.DM `json:"dm"` Arr vvscommon.Arr `json:"arr"` DateTime vvscommon.DateTime `json:"dateTime"` DateRange []vvscommon.DateRange `json:"dateRange"` Option vvscommon.Option `json:"option"` ServingLines vvscommon.ServingLines `json:"servingLines"` DepartureList []departure.Departure `json:"departureList"` }
DepartureResponse encapsulates the response data for an API request querying departure information.
Fields: - Parameters ([]vvscommon.Parameter): A list of parameters that were used in the request, providing insight into the response context. - DM (vvscommon.DM): Provides detailed information about the destination or station from which departures are being queried. - Arr (vvscommon.Arr): Contains specific data related to the departure query. - DateTime (vvscommon.DateTime): The date and time information pertinent to the departure request. - DateRange ([]vvscommon.DateRange): A series of date ranges that are relevant to the departure information provided. - Option (vvscommon.Option): Options applied to the departure request, such as filters or search criteria. - ServingLines (vvscommon.ServingLines): Details about the lines that serve the queried station or location. - DepartureList ([]departure.Departure): A detailed list of departures that match the request criteria, including information about each departure.
DepartureResponse offers a structured approach to understanding the data returned from a departure information request to the API.
func GetDepartures ¶
func GetDepartures(r DepartureRequest, reqParams ...ReqParam) (*DepartureResponse, error)
GetDepartures sends a request to retrieve departure information for a specified station or location. The function takes a DepartureRequest struct containing essential request parameters and a variable number of ReqParam structs to specify additional request options.
Parameters: - r DepartureRequest: A struct containing the base request parameters such as station ID and request time.
OrigId (string): The origin station identifier. In the context of departures, this is the station ID from which departures are requested.
DstId (string): The destination station identifier. Not typically used for departure requests but can be set for API consistency.
TimeAt (*time.Time): The specific date and time for which departure information is requested. If nil, the current time is assumed.
Limit (*int): The maximum number of departure entries to retrieve. If nil, a default limit is applied.
LangCode (*string): The language code for the response (e.g., "de" for German). If nil, a default language is used.
reqParams ...ReqParam: Optional parameters to further customize the request. Each ReqParam consists of a Name and Value. Supported optional parameters (refer to constants for parameter names):
ParamLocationServerActive: Activates the location server for processing the request.
ParamLsShowTrainsExplicit: Specifies whether trains should be shown explicitly in the response.
ParamStateless: Indicates if the request should be processed without maintaining state.
ParamLanguage: Sets the language of the response.
ParamSpEncId: Security parameter, typically "0".
ParamAnySigWhenPerfectNoOtherMatches: Used to refine search results.
ParamLimit: Controls the maximum number of results returned.
ParamDepArr: Indicates whether departure or arrival times are requested ("departure" for departures).
ParamTypeDm: Specifies the type of data management request.
ParamAnyObjFilterDm: Filters objects based on specified criteria.
ParamDeleteAssignedStops: Indicates whether assigned stops should be removed from the response.
ParamNameDm: The name or ID of the station for which departures are being requested.
ParamMode: Specifies the mode of transport.
ParamDmLineSelectionAll: Determines if all lines should be selected in the request.
ParamUseRealtime: Specifies whether real-time data should be used.
ParamOutputFormat: Defines the output format of the response.
ParamCoordOutputFormat: Sets the coordinate format for the response.
Additional parameters related to date and time of the request: ParamItdDateYear, ParamItdDateMonth, ParamItdDateDay, ParamItdTimeHour, ParamItdTimeMinute.
Returns: - (*DepartureResponse, error): A pointer to a DepartureResponse struct containing the requested departure information, or an error if the request fails.
Example usage: response, err := GetDepartures(DepartureRequest{OrigId: "stationID", TimeAt: &time.Now()}, ReqParam{Name: ParamLimit, Value: "10"})
if err != nil { // handle error }
// process response
type JourneyRequest ¶
type JourneyRequest struct { OrigId string DstId string TimeAt *time.Time Limit *int LangCode *string }
JourneyRequest represents the parameters required to request journey information between two points.
Fields: - OrigId (string): Identifier for the origin station or location. This should be a unique identifier recognized by the API. - DstId (string): Identifier for the destination station or location. Similar to OrigId, this should be a unique identifier recognized by the API. - TimeAt (*time.Time): Specifies the desired departure time for the journey. If nil, the current time is assumed. - Limit (*int): Limits the number of journeys returned in the response. If nil, a default limit defined by the API is used. - LangCode (*string): Language code for the response (e.g., "en" for English, "de" for German). If nil, the default language set by the API is used.
This struct is used to encapsulate the request parameters for fetching journey planning information between two locations.
type JourneyResponse ¶
type JourneyResponse struct { ServerInfo vvscommon.ServerInfo `json:"serverInfo"` Version string `json:"version"` SystemMessages []vvscommon.SystemMessage `json:"systemMessages"` Journeys []journey.Journey `json:"journeys"` }
JourneyResponse represents the data structure for a response to a journey planning request.
Fields: - ServerInfo (vvscommon.ServerInfo): Contains metadata about the server that processed the request, including version and performance metrics. - Version (string): The version of the API or data format used to generate the response. - SystemMessages ([]vvscommon.SystemMessage): A list of system messages related to the request, which may include warnings or errors encountered during processing. - Journeys ([]journey.Journey): A list of journey options that match the request criteria, providing comprehensive details about each available journey.
JourneyResponse provides a detailed overview of journey options between specified points, including routes, timings, and other relevant information as per the request parameters.
func GetJourney ¶
func GetJourney(r JourneyRequest, reqParams ...ReqParam) (*JourneyResponse, error)
GetJourney initiates a request to retrieve journey information between two locations at a specified time. It uses the VVS (Verkehrs- und Tarifverbund Stuttgart) API to calculate routes, taking into account various transport options and preferences.
Parameters: - r JourneyRequest: Struct containing the essential information for the journey request.
- OrigId: The ID or code representing the origin location for the journey. This should be in the format recognized by the VVS API, e.g., "de:08111:2599".
- DstId: The ID or code representing the destination location for the journey, formatted similarly to OrigId.
- TimeAt: Pointer to a time.Time object specifying the desired departure or arrival time for the journey.
- Limit: Pointer to an integer specifying the maximum number of journey options to return. If nil, a default value defined by the API will be used.
- LangCode: Pointer to a string specifying the language code for the response, e.g., "de" for German. If nil, the API's default language will be used.
- reqParams ...ReqParam: An optional slice of ReqParam structs allowing for additional parameters to be specified for the journey request. These can include:
- Name: The name of the parameter, matching the constant names defined for VVS API parameters, e.g., ParamCalcOneDirection.
- Value: The value of the parameter, as a string, e.g., "1" for true or specific values like "EPSG:4326" for coordinate formats.
The function supports various optional parameters that can be used to refine the journey search, including but not limited to: - ChangeSpeed: Adjusts the assumed speed of changing between transport modes. - RouteType: Determines the criteria for route selection, such as "LEASTTIME" for the shortest overall journey time. - UseRealtime: Specifies whether to include real-time data in the journey calculation.
Returns: - *JourneyResponse: A pointer to a JourneyResponse struct containing the journey options found based on the request parameters. This includes detailed route information, timings, and any applicable fare information. - error: An error object that will be non-nil if there was an issue processing the request or communicating with the VVS API.
Example usage:
journeyReq := JourneyRequest{ OrigId: "de:08111:2599", DstId: "de:08111:6075", TimeAt: time.Now(), Limit: 10, LangCode: "de", }
journeyResp, err := GetJourney(journeyReq, ReqParam{Name: ParamRouteType, Value: "leasttime"})
if err != nil { // Handle error }
// Process journeyResp
type ReqParam ¶
ReqParam represents an individual request parameter that can be included in API requests.
Fields: - Name (string): The name of the parameter, as expected by the API. This should match the exact name of the parameter in the API documentation. - Value (string): The value assigned to the parameter. The type and format of this value should comply with what is expected by the API for the given parameter name.
ReqParam is utilized to dynamically add additional parameters to requests, allowing for more customized and precise API queries.
Example usage: To specify a limit on the number of results returned by an API, you might create a ReqParam like so: limitParam := ReqParam{Name: "limit", Value: "10"} This ReqParam can then be passed to functions that accept variable request parameters, allowing for dynamic construction of API queries.
type StopFinderRequest ¶ added in v0.2.0
type StopFinderRequest struct { Name string Type string CoordOutputFormat string OutputFormat string ServerInfo *bool Language *string UseRealtime *bool }
StopFinderRequest represents the parameters required to request information about stops for a specific location.
Fields: - Name (string): The name of the stop or location for which stop information is requested. - Type (string): The type of the location being queried (e.g., "any" to allow any type of location). This may correspond to station, locality, or stop types. - CoordOutputFormat (string): Specifies the format of the coordinates in the response, commonly "EPSG:4326" for latitude and longitude. - OutputFormat (string): Specifies the format of the response data, such as "rapidJSON". - ServerInfo (*bool): Whether to include server information in the response. Set true for including it. - Language (*string): The language for the response (e.g., "de" for German). If nil, the default language set by the API is used. - UseRealtime (*bool): Whether to include real-time information in the response. If nil, the API's default behavior is used.
This struct is used to encapsulate the parameters required to search for stops near a location.
type StopFinderResponse ¶ added in v0.2.0
type StopFinderResponse struct { Version string `json:"version"` ServerInfo vvscommon.ServerInfo `json:"serverInfo"` SystemMessages []vvscommon.SystemMessage `json:"systemMessages"` Locations []station.Location `json:"locations"` }
StopFinderResponse represents the data structure for a response to a stop finder request.
Fields: - Version (string): The version of the API or data format used to generate the response. - ServerInfo (vvscommon.ServerInfo): Contains metadata about the server that processed the request, including version, server ID, and processing time metrics. - SystemMessages ([]vvscommon.SystemMessage): A list of system messages related to the request, such as status messages or warnings. - Locations ([]station.Location): A list of locations that match the stop finder request, each containing details about the location, including nearby public transport stops.
StopFinderResponse provides a detailed overview of locations and associated public transport stops that match the requested input, along with relevant server information and system messages.
func GetStopFinder ¶ added in v0.2.0
func GetStopFinder(r StopFinderRequest, reqParams ...ReqParam) (*StopFinderResponse, error)
GetStopFinder sends a request to retrieve stop information for a specified location. The function takes a StopFinderRequest struct containing essential request parameters and a variable number of ReqParam structs to specify additional request options.
Parameters: - r StopFinderRequest: A struct containing the base request parameters such as stop name and type.
Name (string): The name of the stop or location to search for.
Type (string): The type of location being queried (e.g., "any" for any type).
CoordOutputFormat (string): The format in which coordinates should be returned (e.g., "EPSG:4326").
OutputFormat (string): Specifies the format of the response (e.g., "rapidJSON").
ServerInfo (*bool): Whether to include server information in the response. If nil, the default value is used.
Language (*string): The language for the response (e.g., "de" for German). If nil, the default language is used.
UseRealtime (*bool): Whether to use real-time data in the response. If nil, the default value is used.
reqParams ...ReqParam: Optional parameters to further customize the request.
Supported optional parameters (refer to constants for parameter names):
ParamCoordOutputFormat: Specifies the coordinate format (e.g., "EPSG:4326").
ParamOutputFormat: Specifies the response format (e.g., "rapidJSON").
ParamServerInfo: Indicates if server info should be included in the response.
ParamUseRealtime: Specifies whether to use real-time data.
ParamLanguage: The language of the response.
Returns: - (*StopFinderResponse, error): A pointer to a StopFinderResponse struct containing the stop information, or an error if the request fails.
Example usage: response, err := GetStopFinder(StopFinderRequest{Name: "Fred-Uhlman-Str 11", Type: "any"}, ReqParam{Name: ParamLimit, Value: "10"})
if err != nil { // handle error }
// process response