-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Pxp9/ft filters url (#14) * tenemos las tallas gracias a la cortesía de ChatGPT beautiful soup y una buena feature del navegador xd, subimos el JSON donde están todas las categorías (falta parsear) y empezamos con las marcas * script de python que te saca todos los nombres de marcas de la pagina brands/byLetter/Letra * nombres de marcas y tallas extraidas * script que hace requests a la api y obtiene el ID de la marca * Got brands_ids :D * formatting catalogs ids * organizando los recursos de los filtros * materiales * arreglillos de ultima hora * arreglillos de ultima hora * Added scrappers as submodule * Refactor completed * Fmt formatted * actualizando el submodulo del scrapper * primera migration sizes complete * get_catalogs , alvaro y README * Finished catalogs * Fix README * Fix both Readme * Fix dependency for Diesel * Created more migrations * Brands needs a fix * fix migrations and brands * migracion de countries y query de la BBDD de una marca * fix clippy * arreglando un bug con las cookies, haciendo un test y limitando get_item a 1 elemento * fix fmt * mejorando la API del wrapper , implementando FROM de Brand * fix fmt * fix clippy on test * review API and model types * fix fmt * Db tests * fix workflow * empezando a procesar los filtros en la URI * Finished db-feeder * Added some tests * Added query * Added optional num field in get_items * Added Get_category_by_name tested * Converted vec<i32> to String Co-authored-by: Pmarquez <[email protected]> * Finished filters * Fix doctest * Added get-host * Cargo clippy fix * Small changes big steps * Fix languages * fuck cargo fmt --------- Co-authored-by: alvarocabo <[email protected]> Co-authored-by: Pmarquez <[email protected]> * Fix cargo lock * countries , price from and price to filter done (#25) * countries , price from and price to filter done * fix typo docs * Improved README * Fixing doc tests * Small fix * Added search by country * Como no el fmt * Added material and size filters * Removed debug element * Attemp of testing item by color * Ignoring the test for now * Fix clippy * Ignore test for now * Removed main.rs * Updated .gitignore * tests de filtros * fix clippy and fmt --------- Co-authored-by: alvarocabo <[email protected]> * bump the version to 0.2 * fix conflict * merge (#31) * Develop (#26) * Pxp9/ft filters url (#14) * tenemos las tallas gracias a la cortesía de ChatGPT beautiful soup y una buena feature del navegador xd, subimos el JSON donde están todas las categorías (falta parsear) y empezamos con las marcas * script de python que te saca todos los nombres de marcas de la pagina brands/byLetter/Letra * nombres de marcas y tallas extraidas * script que hace requests a la api y obtiene el ID de la marca * Got brands_ids :D * formatting catalogs ids * organizando los recursos de los filtros * materiales * arreglillos de ultima hora * arreglillos de ultima hora * Added scrappers as submodule * Refactor completed * Fmt formatted * actualizando el submodulo del scrapper * primera migration sizes complete * get_catalogs , alvaro y README * Finished catalogs * Fix README * Fix both Readme * Fix dependency for Diesel * Created more migrations * Brands needs a fix * fix migrations and brands * migracion de countries y query de la BBDD de una marca * fix clippy * arreglando un bug con las cookies, haciendo un test y limitando get_item a 1 elemento * fix fmt * mejorando la API del wrapper , implementando FROM de Brand * fix fmt * fix clippy on test * review API and model types * fix fmt * Db tests * fix workflow * empezando a procesar los filtros en la URI * Finished db-feeder * Added some tests * Added query * Added optional num field in get_items * Added Get_category_by_name tested * Converted vec<i32> to String Co-authored-by: Pmarquez <[email protected]> * Finished filters * Fix doctest * Added get-host * Cargo clippy fix * Small changes big steps * Fix languages * fuck cargo fmt --------- Co-authored-by: alvarocabo <[email protected]> Co-authored-by: Pmarquez <[email protected]> * Fix cargo lock * countries , price from and price to filter done (#25) * countries , price from and price to filter done * fix typo docs * Improved README * Fixing doc tests * Small fix * Added search by country * Como no el fmt * Added material and size filters * Removed debug element * Attemp of testing item by color * Ignoring the test for now * Fix clippy * Ignore test for now * Removed main.rs * Updated .gitignore * tests de filtros * fix clippy and fmt --------- Co-authored-by: alvarocabo <[email protected]> --------- Co-authored-by: alvarocabo <[email protected]> Co-authored-by: Pmarquez <[email protected]> * chore(cargo): bump serde from 1.0.167 to 1.0.168 (#27) Bumps [serde](https://github.com/serde-rs/serde) from 1.0.167 to 1.0.168. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](serde-rs/serde@v1.0.167...v1.0.168) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update README.md (#28) * delete Cargo.lock (#29) --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: alvarocabo <[email protected]> Co-authored-by: Pmarquez <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * currency config (#32) * currency config * fix fmt * currency constructor * Added test * cargo fmt --------- Co-authored-by: alvarocabo <[email protected]> * example filter (#33) * fix fmt * Added pretty nice documentation (#35) * Added pretty nice documentation * Fmt fixxx * Fix typeBuilder typo * Las comillas :< * Bump to version 0.3 * Init CHANGELOG --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Pmarquez <[email protected]> Co-authored-by: Pmarquez <[email protected]> Co-authored-by: pxp9 <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- Loading branch information
1 parent
8b5351a
commit af74e5a
Showing
17 changed files
with
286 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
/target | ||
**/main.rs | ||
/**/target | ||
Cargo.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Changelog | ||
|
||
## 0.3.0 (2023-07-15) #34 | ||
|
||
### Added | ||
|
||
- Filter by Currency implemented - #32 | ||
- Example project using advanced filters feature - #33 | ||
- CHANGELOG file | ||
|
||
### Improved | ||
|
||
- Documentation for `filter` module - #35 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "vinted-rs" | ||
version = "0.2.0" | ||
version = "0.3.0" | ||
edition = "2021" | ||
repository = "https://github.com/TuTarea/vinted-rs" | ||
authors = ["Pepe Márquez <[email protected]>" , "Álvaro Cabo <[email protected]>"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[package] | ||
name = "filter_example" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
vinted-rs = { path = "../../", features = ["advanced_filters"]} | ||
bb8-postgres = {version = "0.8", features = ["with-serde_json-1" , "with-uuid-1" , "with-chrono-0_4"]} | ||
tokio = { version = "1", features = ["full"] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
use bb8_postgres::tokio_postgres::NoTls; | ||
use vinted_rs::{db::DbController, Filter, VintedWrapper}; | ||
|
||
#[tokio::main] | ||
async fn main() { | ||
let db = DbController::new("postgres://postgres:postgres@localhost/vinted-rs", 5, NoTls) | ||
.await | ||
.unwrap(); | ||
|
||
let adidas = db.get_brand_by_name(&"Adidas").await.unwrap(); | ||
let nike = db.get_brand_by_name(&"Nike").await.unwrap(); | ||
|
||
let brands = format!("{},{}", adidas.id, nike.id); | ||
|
||
let filter = Filter::builder() | ||
.brand_ids(brands) | ||
.price_from(15) | ||
.price_to(20) | ||
.build(); | ||
|
||
let vinted = VintedWrapper::new(); | ||
|
||
let items = vinted.get_items(&filter, 10).await.unwrap(); | ||
|
||
println!("{:?}", items); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.