update time matching
This commit is contained in:
parent
ab53f677d9
commit
42fb40437a
|
@ -53,7 +53,7 @@ func (c *Client) PlanWithResponse(ctx context.Context, params *PlanParams) (*Tra
|
||||||
|
|
||||||
if params.Time != nil {
|
if params.Time != nil {
|
||||||
// Use ISO 8601 format with timezone like in the example
|
// Use ISO 8601 format with timezone like in the example
|
||||||
query.Set("time", params.Time.Format(time.RFC3339))
|
query.Set("time", params.Time.Add(-2*time.Hour).Format(time.RFC3339))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Additional parameters matching the example
|
// Additional parameters matching the example
|
||||||
|
@ -61,6 +61,8 @@ func (c *Client) PlanWithResponse(ctx context.Context, params *PlanParams) (*Tra
|
||||||
query.Set("fastestDirectFactor", "1.5")
|
query.Set("fastestDirectFactor", "1.5")
|
||||||
query.Set("joinInterlinedLegs", "false")
|
query.Set("joinInterlinedLegs", "false")
|
||||||
query.Set("maxMatchingDistance", "250")
|
query.Set("maxMatchingDistance", "250")
|
||||||
|
query.Set("searchWindow", "14400")
|
||||||
|
// query.Set("timetableView", "false")
|
||||||
// query.Set("arriveBy", "true")
|
// query.Set("arriveBy", "true")
|
||||||
|
|
||||||
u.RawQuery = query.Encode()
|
u.RawQuery = query.Encode()
|
||||||
|
@ -76,6 +78,7 @@ func (c *Client) PlanWithResponse(ctx context.Context, params *PlanParams) (*Tra
|
||||||
|
|
||||||
log.Debug().
|
log.Debug().
|
||||||
Str("url", u.String()).
|
Str("url", u.String()).
|
||||||
|
Time("time", *params.Time).
|
||||||
Msg("Making Transitous API request")
|
Msg("Making Transitous API request")
|
||||||
|
|
||||||
// Execute request
|
// Execute request
|
||||||
|
|
Loading…
Reference in New Issue