Methods overhaul
This commit is contained in:
10
README.md
10
README.md
@@ -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
|
||||
|
Reference in New Issue
Block a user