Skip to content

Commit

Permalink
Add new SNCF Avantage cards + update README
Browse files Browse the repository at this point in the history
  • Loading branch information
tducret committed Jul 5, 2019
1 parent 578f5aa commit 6d37d53
Show file tree
Hide file tree
Showing 3 changed files with 29,960 additions and 10 deletions.
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ departure_date;arrival_date;duration;number_of_segments;price;currency;transport
# -*- coding: utf-8 -*-
import trainline

Pierre = trainline.Passenger(birthdate="01/01/1980")
Pierre = trainline.Passenger(birthdate="01/01/1980", cards=[trainline.AVANTAGE_FAMILLE])
Sophie = trainline.Passenger(birthdate="01/02/1981")
Enzo = trainline.Passenger(birthdate="01/03/2012", cards=[trainline.ENFANT_PLUS])
Nicolas = trainline.Passenger(birthdate="01/01/1996", cards=[trainline.JEUNE])
Enzo = trainline.Passenger(birthdate="01/03/2012")
Nicolas = trainline.Passenger(birthdate="01/01/1996", cards=[trainline.AVANTAGE_JEUNE])
Nicolas.add_special_card(trainline.TGVMAX, "YourCardNumber")

results = trainline.search(
Expand All @@ -115,9 +115,6 @@ departure_date;arrival_date;duration;number_of_segments;price;currency;transport
[...]
```

user = trainline.Passenger(birthdate="01/01/1996", cards=[trainline.JEUNE])
user.add_special_card(trainline.TGVMAX, "YourCardNumber")

# Docker

You can use the `trainline` tool with the [Docker image](https://hub.docker.com/r/thibdct/trainline/)
Expand Down
Loading

0 comments on commit 6d37d53

Please sign in to comment.