vinted-rs

Crates.iovinted-rs
lib.rsvinted-rs
version0.11.0
created_at2023-07-08 17:58:18.08462+00
updated_at2025-04-18 15:32:55.017093+00
descriptionAn async Vinted API wrapper
homepage
repositoryhttps://github.com/TuTarea/vinted-rs
max_upload_size
id911591
size9,029,986
Álvaro Cabo (0xCAB0)

documentation

README

Vinted-rs: A Vinted API wrapper in Rust

githubcrates-iodocs-rs

Installation

Via cargo you can add the library to your project's Cargo.toml

[dependencies]
vinted-rs = { version = "0.11.0", 
              #features = ["advanced_filters", "redis"] 
              }

Features

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

Advanced filters

[!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.

Environment set-up

  1. Copy the .env.example

    cp .env.example .env
    
  2. Modify the variables to your liking

Database set-up

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 Arch based is only necessary to install this package.

    sudo pacman -S postgresql-libs
    
  • In Debian based distributions is only necessary to install this package.

    sudo apt install libpq-dev
    
  1. Install diesel-cli in order to run the migrations in PostgreSQL database

    cargo install diesel_cli --features=postgres --no-default-features
    

Available interactions (See Makefile)

  1. Create a migration

    mkdir -p migrations #
    diesel migration generate my_migration
    

    Program after that up.sql and down.sql scripts.

  2. Run a Docker container with PostgreSQL

    make db
    
  3. Run migrations

    make diesel
    
  4. Stop DB

    make stop
    

Testing set-up

[!NOTE] This step requires completing the DB setup

cargo test

Redis

This feature allows recovered results to be cached using a Redis instance.

A development instance can be created using:

make cache
Commit count: 200

cargo fmt