Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brandaoplaster/flight_reservations
Application for managing flight reservations :flight_departure:
https://github.com/brandaoplaster/flight_reservations
elixir
Last synced: 19 days ago
JSON representation
Application for managing flight reservations :flight_departure:
- Host: GitHub
- URL: https://github.com/brandaoplaster/flight_reservations
- Owner: brandaoplaster
- Created: 2021-04-21T04:31:28.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-02-01T00:33:05.000Z (almost 3 years ago)
- Last Synced: 2024-10-23T05:55:36.872Z (2 months ago)
- Topics: elixir
- Language: Elixir
- Homepage:
- Size: 24.4 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Flight Reservations
Application for managing flight reservations.
# Guide
- Starting the agents
```
FlightReservations.start_agents
```- User parameters
```
params_user = %{name: "phoenix", email: "[email protected]", cpf: "00013890"}
```- Creating a user
```
{:ok, id} = FlightReservations.create_or_update_user(params_user)
```- Booking parameters
```
params_booking = %{complete_date: "2021-04-17 14:00:00",
origin_city: "New city",
destination_city: "Last City",
user_id: id}
```- Creating a booking
```
{:ok, booking_id} = FlightReservations.create_or_update_booking(params_booking)
```- Fetching a booking by id
```
FlightReservations.get_booking(booking_id)
```## Installation
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `flight_reservations` to your list of dependencies in `mix.exs`:```elixir
def deps do
[
{:flight_reservations, "~> 0.1.0"}
]
end
```Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
be found at [https://hexdocs.pm/flight_reservations](https://hexdocs.pm/flight_reservations).