blocket-api 0.4.33__tar.gz → 0.5.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {blocket_api-0.4.33 → blocket_api-0.5.1}/PKG-INFO +7 -3
- {blocket_api-0.4.33 → blocket_api-0.5.1}/README.md +5 -1
- {blocket_api-0.4.33 → blocket_api-0.5.1}/blocket_api/__init__.py +2 -0
- {blocket_api-0.4.33 → blocket_api-0.5.1}/blocket_api/blocket.py +7 -1
- {blocket_api-0.4.33 → blocket_api-0.5.1}/blocket_api/constants.py +7 -0
- {blocket_api-0.4.33 → blocket_api-0.5.1}/blocket_api.egg-info/PKG-INFO +7 -3
- {blocket_api-0.4.33 → blocket_api-0.5.1}/blocket_api.egg-info/requires.txt +1 -1
- {blocket_api-0.4.33 → blocket_api-0.5.1}/pyproject.toml +2 -2
- {blocket_api-0.4.33 → blocket_api-0.5.1}/LICENSE +0 -0
- {blocket_api-0.4.33 → blocket_api-0.5.1}/blocket_api/ad_parser.py +0 -0
- {blocket_api-0.4.33 → blocket_api-0.5.1}/blocket_api.egg-info/SOURCES.txt +0 -0
- {blocket_api-0.4.33 → blocket_api-0.5.1}/blocket_api.egg-info/dependency_links.txt +0 -0
- {blocket_api-0.4.33 → blocket_api-0.5.1}/blocket_api.egg-info/top_level.txt +0 -0
- {blocket_api-0.4.33 → blocket_api-0.5.1}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: blocket_api
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.1
|
|
4
4
|
Summary: A python API wrapper for blocket.se
|
|
5
5
|
Author-email: dunderrrrrr <emil.bjorkroth@gmail.com>
|
|
6
6
|
Requires-Python: >=3.10
|
|
@@ -15,7 +15,7 @@ Requires-Dist: mkdocs>=1.6.1
|
|
|
15
15
|
Requires-Dist: mkdocs-material>=9.7.1
|
|
16
16
|
Requires-Dist: mkdocs-swagger-ui-tag>=0.7.2
|
|
17
17
|
Requires-Dist: beautifulsoup4>=4.14.3
|
|
18
|
-
Requires-Dist: ruff>=0.15.
|
|
18
|
+
Requires-Dist: ruff>=0.15.12
|
|
19
19
|
Dynamic: license-file
|
|
20
20
|
|
|
21
21
|
<p align="center">
|
|
@@ -24,7 +24,7 @@ Dynamic: license-file
|
|
|
24
24
|
|
|
25
25
|
# BlocketAPI
|
|
26
26
|
|
|
27
|
-
[](https://pypi.org/project/blocket_api/) [](https://github.com/dunderrrrrr/blocket_api/blob/main/LICENSE)  ](https://pypi.org/project/blocket_api/) [](https://github.com/dunderrrrrr/blocket_api/blob/main/LICENSE)  
|
|
28
28
|
|
|
29
29
|
BlocketAPI allows users to search [blocket.se](https://blocket.se/) for ads.
|
|
30
30
|
|
|
@@ -50,6 +50,7 @@ from blocket_api import (
|
|
|
50
50
|
CarModel,
|
|
51
51
|
CarSortOrder,
|
|
52
52
|
CarTransmission,
|
|
53
|
+
CarWheelDrive,
|
|
53
54
|
Location,
|
|
54
55
|
)
|
|
55
56
|
|
|
@@ -72,7 +73,10 @@ api.search_car(
|
|
|
72
73
|
price_from=10000,
|
|
73
74
|
price_to=50000,
|
|
74
75
|
transmissions=[CarTransmission.MANUAL],
|
|
76
|
+
wheel_drive=[CarWheelDrive.RWD],
|
|
75
77
|
locations=[Location.STOCKHOLM],
|
|
78
|
+
horsepower_from=200,
|
|
79
|
+
horsepower_to=300,
|
|
76
80
|
org_id=1337, # dealer or store id
|
|
77
81
|
)
|
|
78
82
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# BlocketAPI
|
|
6
6
|
|
|
7
|
-
[](https://pypi.org/project/blocket_api/) [](https://github.com/dunderrrrrr/blocket_api/blob/main/LICENSE)  ](https://pypi.org/project/blocket_api/) [](https://github.com/dunderrrrrr/blocket_api/blob/main/LICENSE)  
|
|
8
8
|
|
|
9
9
|
BlocketAPI allows users to search [blocket.se](https://blocket.se/) for ads.
|
|
10
10
|
|
|
@@ -30,6 +30,7 @@ from blocket_api import (
|
|
|
30
30
|
CarModel,
|
|
31
31
|
CarSortOrder,
|
|
32
32
|
CarTransmission,
|
|
33
|
+
CarWheelDrive,
|
|
33
34
|
Location,
|
|
34
35
|
)
|
|
35
36
|
|
|
@@ -52,7 +53,10 @@ api.search_car(
|
|
|
52
53
|
price_from=10000,
|
|
53
54
|
price_to=50000,
|
|
54
55
|
transmissions=[CarTransmission.MANUAL],
|
|
56
|
+
wheel_drive=[CarWheelDrive.RWD],
|
|
55
57
|
locations=[Location.STOCKHOLM],
|
|
58
|
+
horsepower_from=200,
|
|
59
|
+
horsepower_to=300,
|
|
56
60
|
org_id=1337, # dealer or store id
|
|
57
61
|
)
|
|
58
62
|
|
|
@@ -7,6 +7,7 @@ from .constants import (
|
|
|
7
7
|
CarModel,
|
|
8
8
|
CarSortOrder,
|
|
9
9
|
CarTransmission,
|
|
10
|
+
CarWheelDrive,
|
|
10
11
|
Category,
|
|
11
12
|
McModel,
|
|
12
13
|
McSortOrder,
|
|
@@ -26,6 +27,7 @@ __all__ = [
|
|
|
26
27
|
"CarModel",
|
|
27
28
|
"CarSortOrder",
|
|
28
29
|
"CarTransmission",
|
|
30
|
+
"CarWheelDrive",
|
|
29
31
|
"Category",
|
|
30
32
|
"SortOrder",
|
|
31
33
|
"SubCategory",
|
|
@@ -15,6 +15,7 @@ from .constants import (
|
|
|
15
15
|
CarModel,
|
|
16
16
|
CarSortOrder,
|
|
17
17
|
CarTransmission,
|
|
18
|
+
CarWheelDrive,
|
|
18
19
|
Category,
|
|
19
20
|
Location,
|
|
20
21
|
McModel,
|
|
@@ -88,6 +89,9 @@ class BlocketAPI:
|
|
|
88
89
|
milage_to: int | None = None,
|
|
89
90
|
colors: list[CarColor] = [],
|
|
90
91
|
transmissions: list[CarTransmission] = [],
|
|
92
|
+
horsepower_from: int | None = None,
|
|
93
|
+
horsepower_to: int | None = None,
|
|
94
|
+
wheel_drive: list[CarWheelDrive] = [],
|
|
91
95
|
org_id: int | None = None,
|
|
92
96
|
) -> dict[str, Any]:
|
|
93
97
|
url = f"{SITE_URL}/mobility/search/api/search/SEARCH_ID_CAR_USED"
|
|
@@ -102,16 +106,18 @@ class BlocketAPI:
|
|
|
102
106
|
"year_to": year_to,
|
|
103
107
|
"milage_from": milage_from,
|
|
104
108
|
"milage_to": milage_to,
|
|
109
|
+
"engine_effect_from": horsepower_from,
|
|
110
|
+
"engine_effect_to": horsepower_to,
|
|
105
111
|
"orgId": org_id,
|
|
106
112
|
}
|
|
107
113
|
|
|
108
114
|
params = [QueryParam(k, v) for k, v in param_dict.items() if v is not None]
|
|
109
115
|
|
|
110
|
-
# Multi-value params
|
|
111
116
|
params.extend(QueryParam("location", loc.value) for loc in locations)
|
|
112
117
|
params.extend(QueryParam("make", model.value) for model in models)
|
|
113
118
|
params.extend(QueryParam("exterior_colour", color.value) for color in colors)
|
|
114
119
|
params.extend(QueryParam("transmission", t.value) for t in transmissions)
|
|
120
|
+
params.extend(QueryParam("wheel_drive", w.value) for w in wheel_drive)
|
|
115
121
|
|
|
116
122
|
return _request(url=url, params=params).json()
|
|
117
123
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: blocket_api
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.1
|
|
4
4
|
Summary: A python API wrapper for blocket.se
|
|
5
5
|
Author-email: dunderrrrrr <emil.bjorkroth@gmail.com>
|
|
6
6
|
Requires-Python: >=3.10
|
|
@@ -15,7 +15,7 @@ Requires-Dist: mkdocs>=1.6.1
|
|
|
15
15
|
Requires-Dist: mkdocs-material>=9.7.1
|
|
16
16
|
Requires-Dist: mkdocs-swagger-ui-tag>=0.7.2
|
|
17
17
|
Requires-Dist: beautifulsoup4>=4.14.3
|
|
18
|
-
Requires-Dist: ruff>=0.15.
|
|
18
|
+
Requires-Dist: ruff>=0.15.12
|
|
19
19
|
Dynamic: license-file
|
|
20
20
|
|
|
21
21
|
<p align="center">
|
|
@@ -24,7 +24,7 @@ Dynamic: license-file
|
|
|
24
24
|
|
|
25
25
|
# BlocketAPI
|
|
26
26
|
|
|
27
|
-
[](https://pypi.org/project/blocket_api/) [](https://github.com/dunderrrrrr/blocket_api/blob/main/LICENSE)  ](https://pypi.org/project/blocket_api/) [](https://github.com/dunderrrrrr/blocket_api/blob/main/LICENSE)  
|
|
28
28
|
|
|
29
29
|
BlocketAPI allows users to search [blocket.se](https://blocket.se/) for ads.
|
|
30
30
|
|
|
@@ -50,6 +50,7 @@ from blocket_api import (
|
|
|
50
50
|
CarModel,
|
|
51
51
|
CarSortOrder,
|
|
52
52
|
CarTransmission,
|
|
53
|
+
CarWheelDrive,
|
|
53
54
|
Location,
|
|
54
55
|
)
|
|
55
56
|
|
|
@@ -72,7 +73,10 @@ api.search_car(
|
|
|
72
73
|
price_from=10000,
|
|
73
74
|
price_to=50000,
|
|
74
75
|
transmissions=[CarTransmission.MANUAL],
|
|
76
|
+
wheel_drive=[CarWheelDrive.RWD],
|
|
75
77
|
locations=[Location.STOCKHOLM],
|
|
78
|
+
horsepower_from=200,
|
|
79
|
+
horsepower_to=300,
|
|
76
80
|
org_id=1337, # dealer or store id
|
|
77
81
|
)
|
|
78
82
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "blocket_api"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.5.1"
|
|
4
4
|
description = "A python API wrapper for blocket.se"
|
|
5
5
|
authors = [{name = "dunderrrrrr", email = "emil.bjorkroth@gmail.com"}]
|
|
6
6
|
readme = "README.md"
|
|
@@ -15,7 +15,7 @@ dependencies = [
|
|
|
15
15
|
"mkdocs-material>=9.7.1",
|
|
16
16
|
"mkdocs-swagger-ui-tag>=0.7.2",
|
|
17
17
|
"beautifulsoup4>=4.14.3",
|
|
18
|
-
"ruff>=0.15.
|
|
18
|
+
"ruff>=0.15.12",
|
|
19
19
|
]
|
|
20
20
|
|
|
21
21
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|