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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: blocket_api
3
- Version: 0.4.33
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.8
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
- [![PyPI version](https://img.shields.io/pypi/v/blocket_api?style=for-the-badge)](https://pypi.org/project/blocket_api/) [![License](https://img.shields.io/badge/license-WTFPL-green?style=for-the-badge)](https://github.com/dunderrrrrr/blocket_api/blob/main/LICENSE) ![Python](https://img.shields.io/badge/Python-3.10-blue?style=for-the-badge) ![PyPI - Downloads](https://img.shields.io/pypi/dw/blocket_api?style=for-the-badge&color=%23dbce58)
27
+ [![PyPI version](https://img.shields.io/pypi/v/blocket_api?style=for-the-badge)](https://pypi.org/project/blocket_api/) [![License](https://img.shields.io/badge/license-WTFPL-green?style=for-the-badge)](https://github.com/dunderrrrrr/blocket_api/blob/main/LICENSE) ![Python](https://img.shields.io/badge/Python-3.10-blue?style=for-the-badge) ![PyPI - Downloads](https://img.shields.io/pypi/dm/blocket_api?style=for-the-badge&color=%23dbce58)
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
- [![PyPI version](https://img.shields.io/pypi/v/blocket_api?style=for-the-badge)](https://pypi.org/project/blocket_api/) [![License](https://img.shields.io/badge/license-WTFPL-green?style=for-the-badge)](https://github.com/dunderrrrrr/blocket_api/blob/main/LICENSE) ![Python](https://img.shields.io/badge/Python-3.10-blue?style=for-the-badge) ![PyPI - Downloads](https://img.shields.io/pypi/dw/blocket_api?style=for-the-badge&color=%23dbce58)
7
+ [![PyPI version](https://img.shields.io/pypi/v/blocket_api?style=for-the-badge)](https://pypi.org/project/blocket_api/) [![License](https://img.shields.io/badge/license-WTFPL-green?style=for-the-badge)](https://github.com/dunderrrrrr/blocket_api/blob/main/LICENSE) ![Python](https://img.shields.io/badge/Python-3.10-blue?style=for-the-badge) ![PyPI - Downloads](https://img.shields.io/pypi/dm/blocket_api?style=for-the-badge&color=%23dbce58)
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
 
@@ -381,6 +381,13 @@ class CarTransmission(IntEnum):
381
381
  MANUAL = 1
382
382
 
383
383
 
384
+ class CarWheelDrive(IntEnum):
385
+ FWD = 3
386
+ RWD = 1
387
+ FOUR = 2
388
+ TWO = 1729
389
+
390
+
384
391
  class BoatType(IntEnum):
385
392
  BOWRIDER = 7961
386
393
  DAYCRUISER = 2184
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: blocket_api
3
- Version: 0.4.33
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.8
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
- [![PyPI version](https://img.shields.io/pypi/v/blocket_api?style=for-the-badge)](https://pypi.org/project/blocket_api/) [![License](https://img.shields.io/badge/license-WTFPL-green?style=for-the-badge)](https://github.com/dunderrrrrr/blocket_api/blob/main/LICENSE) ![Python](https://img.shields.io/badge/Python-3.10-blue?style=for-the-badge) ![PyPI - Downloads](https://img.shields.io/pypi/dw/blocket_api?style=for-the-badge&color=%23dbce58)
27
+ [![PyPI version](https://img.shields.io/pypi/v/blocket_api?style=for-the-badge)](https://pypi.org/project/blocket_api/) [![License](https://img.shields.io/badge/license-WTFPL-green?style=for-the-badge)](https://github.com/dunderrrrrr/blocket_api/blob/main/LICENSE) ![Python](https://img.shields.io/badge/Python-3.10-blue?style=for-the-badge) ![PyPI - Downloads](https://img.shields.io/pypi/dm/blocket_api?style=for-the-badge&color=%23dbce58)
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
 
@@ -7,4 +7,4 @@ mkdocs>=1.6.1
7
7
  mkdocs-material>=9.7.1
8
8
  mkdocs-swagger-ui-tag>=0.7.2
9
9
  beautifulsoup4>=4.14.3
10
- ruff>=0.15.8
10
+ ruff>=0.15.12
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "blocket_api"
3
- version = "0.4.33"
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.8",
18
+ "ruff>=0.15.12",
19
19
  ]
20
20
 
21
21
 
File without changes
File without changes