Via cargo you can add the library to your project's Cargo.toml
[dependencies]
vinted-rs = { version = "0.11.0",
#features = ["advanced_filters", "redis"]
}| Feature | Description | Example |
|---|---|---|
| Advanced Filters | Uses the data pulled by the scrapping module, which is stored in the diesel migrations folder. | ✅ |
| Redis | Allows recovered results to be cached using a Redis instance | ❌ |
Note
This feature requires setting up a Postgres Database
Uses the data pulled by the scrapping module, which is stored in the diesel migrations folder.
-
Copy the
.env.examplecp .env.example .env
-
Modify the variables to your liking
Advanced filtering features must require this setup before running.
Important
diesel-cli installation may fail if you do not have libpq library installed. To install libpq, just install PostgreSQL package on your machine.
-
In
Archbased is only necessary to install this package.sudo pacman -S postgresql-libs
-
In
Debianbased distributions is only necessary to install this package.sudo apt install libpq-dev
-
Install
diesel-cliin order to run the migrations in PostgreSQL databasecargo install diesel_cli --features=postgres --no-default-features
Available interactions (See Makefile)
-
Create a migration
mkdir -p migrations # diesel migration generate my_migrationProgram after that
up.sqlanddown.sqlscripts. -
Run a Docker container with PostgreSQL
- See in Makefile
make db
-
Run migrations
make diesel
-
Stop DB
make stop
Note
This step requires completing the DB setup
cargo testThis feature allows recovered results to be cached using a Redis instance.
A development instance can be created using:
make cache