Methods overhaul

This commit is contained in:
2022-10-07 11:35:02 +02:00
parent 201fcba766
commit 036a3174f8
18 changed files with 670 additions and 782 deletions

View File

@@ -25,15 +25,15 @@ If you have everything listed in [requirements](#requirements), then let's begin
```py
import pyrmv
# Set API key
access_id = "Something"
# Define a Client with API key
client = pyrmv.Client("AcessId")
# Get origin's and destination's location
origin = pyrmv.stop_by_name(access_id, "Frankfurt Hauptbahnhof", max_number=3)[0]
destination = pyrmv.stop_by_coords(access_id, 50.099613, 8.685449, max_number=3)[0]
origin = client.stop_by_name("Frankfurt Hauptbahnhof", max_number=3)[0]
destination = client.stop_by_coords(50.099613, 8.685449, max_number=3)[0]
# Find a trip by locations got
trip = pyrmv.trip_find(access_id, origin_id=origin.id, dest_id=destination.id)
trip = client.trip_find(origin_id=origin.id, dest_id=destination.id)
```
# Frequently Asked Questions