/rocketseat-exlivery

:rocket: Project developed on the Rocketseat elixir track.

Primary LanguageElixir

๐Ÿš€Exlivery

GitHub repo size GitHub language count GitHub forks Bitbucket open issues Bitbucket open pull requests

Simple project developed during the Elixir track on the Rocketseat platform.

๐Ÿ’ป Requirements

Before you begin, make sure you have met the following requirements:

  • You need the latest version of Elixir\Erlang on your machine.

If you need installation instructions, click here.

๐Ÿš€ Installing Exlivery

To install Exlivery, follow these steps:

1ยบ Clone the repository.

>  git clone https://github.com/joabehenrique/rocketseat-exlivery.git

2ยบ Navigate to the project folder.

>  cd rocketseat-exlivery/exlivery

3ยบ Use the command below to download the dependencies.

>  mix deps.get

4ยบ Use the command below to run the project.

>  iex -S mix

โ˜• Using Exlivery

To use Exlivery, follow these steps:

Creating a user and your application. (Age >=18)

>  Exlivery.start_agents()
>  {:ok, user} = Exlivery.Users.User.build("name", "email", age, "cpf", "address")

>  Exlivery.create_or_update_user(user)

Before creating my order I need to tell you what I want in this order.

(Possible Categories :pizza, :hamburguer, :carne, :prato_feito, :japonesa, :sobremesa.)

>  {:ok, item} = Exlivery.Orders.Item.build("description-item", category, "price-unity", "quantity")

Creating the order for my user.

>  Exlivery.create_or_update_order(%{user_cpf: "cpf", item: [item]})

Generating a report with my user information and their order.

( File name is optional. It is saved inside ./lib/generated-reports/name-report.csv)

>  Exlivery.Orders.Report.create("name-report.csv")

๐Ÿ“ซ Contributing to Exlivery

To contribute to Exlivery, follow these steps:

  1. Fork this repository.
  2. Create a branch: git checkout -b <nome_branch>.
  3. Make your changes and commit them: git commit -m '<commit_message>'
  4. Send to the original branch: git push origin Exlivery / <local>
  5. Create the pull request.

Alternatively, see the GitHub documentation at how to create a pull request..

๐Ÿค Author and Contributors

We thank the following people who contributed to this project:

Foto do Joabe Henrique no GitHub
Joabe Henrique [Author]

๐Ÿ˜„ Be one of the contributors

Do you want to be part of this project? Click here and read how to contribute.

๐Ÿ“ License

This project is under license. See the license file for more details.