beachdayapi 0.1.1__tar.gz → 0.1.2__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.
- {beachdayapi-0.1.1 → beachdayapi-0.1.2}/PKG-INFO +9 -5
- {beachdayapi-0.1.1 → beachdayapi-0.1.2}/README.md +8 -4
- {beachdayapi-0.1.1 → beachdayapi-0.1.2}/beachdayapi/client.py +3 -0
- {beachdayapi-0.1.1 → beachdayapi-0.1.2}/beachdayapi.egg-info/PKG-INFO +9 -5
- {beachdayapi-0.1.1 → beachdayapi-0.1.2}/pyproject.toml +1 -1
- {beachdayapi-0.1.1 → beachdayapi-0.1.2}/beachdayapi/__init__.py +0 -0
- {beachdayapi-0.1.1 → beachdayapi-0.1.2}/beachdayapi/exceptions.py +0 -0
- {beachdayapi-0.1.1 → beachdayapi-0.1.2}/beachdayapi.egg-info/SOURCES.txt +0 -0
- {beachdayapi-0.1.1 → beachdayapi-0.1.2}/beachdayapi.egg-info/dependency_links.txt +0 -0
- {beachdayapi-0.1.1 → beachdayapi-0.1.2}/beachdayapi.egg-info/top_level.txt +0 -0
- {beachdayapi-0.1.1 → beachdayapi-0.1.2}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: beachdayapi
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: Python client for the Beach Day API — real-time beach and surf conditions
|
|
5
5
|
Author-email: Beach Day API <hello@beachdayapi.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -28,7 +28,7 @@ Description-Content-Type: text/markdown
|
|
|
28
28
|
[](https://pypi.org/project/beachdayapi/)
|
|
29
29
|
[](https://opensource.org/licenses/MIT)
|
|
30
30
|
|
|
31
|
-
Python client for the [Beach Day API](https://beachdayapi.com) — water quality, weather, tides, ocean conditions, beach rules, amenities, and composite scoring in a single call. Covers 4,
|
|
31
|
+
Python client for the [Beach Day API](https://beachdayapi.com) — water quality, weather, tides, ocean conditions, beach rules, amenities, and composite scoring in a single call. Covers 4,500+ beaches across the US, Australia, South Africa, and Spain.
|
|
32
32
|
|
|
33
33
|
```bash
|
|
34
34
|
pip install beachdayapi
|
|
@@ -41,8 +41,10 @@ from beachdayapi import BeachDayAPI
|
|
|
41
41
|
|
|
42
42
|
client = BeachDayAPI("bda_your_api_key")
|
|
43
43
|
|
|
44
|
-
# Search beaches by state
|
|
44
|
+
# Search beaches by state (supports offset/limit pagination)
|
|
45
45
|
beaches = client.beaches.list(state="CA")
|
|
46
|
+
# Pagination: client.beaches.list(state="CA", offset=100, limit=50)
|
|
47
|
+
# Filter by country: client.beaches.list(country="Cambodia")
|
|
46
48
|
for b in beaches["data"]:
|
|
47
49
|
print(b["name"], b["state"])
|
|
48
50
|
|
|
@@ -54,12 +56,14 @@ print(f"Found {malibu['count']} beaches matching 'Malibu'")
|
|
|
54
56
|
beach = client.beaches.get(372)
|
|
55
57
|
print(beach["data"]["name"], beach["data"]["beach_day_score"])
|
|
56
58
|
|
|
57
|
-
# Get current conditions
|
|
59
|
+
# Get current conditions (supports offset/limit)
|
|
58
60
|
conditions = client.beaches.conditions(372)
|
|
61
|
+
# Pagination: client.beaches.conditions(372, offset=30, limit=15)
|
|
59
62
|
print(conditions["data"]["water_quality_grade"])
|
|
60
63
|
|
|
61
|
-
# Get top-scored beaches
|
|
64
|
+
# Get top-scored beaches (supports offset/limit)
|
|
62
65
|
scored = client.beaches.scored(min_score=70, limit=10)
|
|
66
|
+
# Pagination: client.beaches.scored(offset=50, limit=25)
|
|
63
67
|
for b in scored["data"]:
|
|
64
68
|
print(f"{b['name']}: {b['beach_day_score']}")
|
|
65
69
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
[](https://pypi.org/project/beachdayapi/)
|
|
5
5
|
[](https://opensource.org/licenses/MIT)
|
|
6
6
|
|
|
7
|
-
Python client for the [Beach Day API](https://beachdayapi.com) — water quality, weather, tides, ocean conditions, beach rules, amenities, and composite scoring in a single call. Covers 4,
|
|
7
|
+
Python client for the [Beach Day API](https://beachdayapi.com) — water quality, weather, tides, ocean conditions, beach rules, amenities, and composite scoring in a single call. Covers 4,500+ beaches across the US, Australia, South Africa, and Spain.
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
pip install beachdayapi
|
|
@@ -17,8 +17,10 @@ from beachdayapi import BeachDayAPI
|
|
|
17
17
|
|
|
18
18
|
client = BeachDayAPI("bda_your_api_key")
|
|
19
19
|
|
|
20
|
-
# Search beaches by state
|
|
20
|
+
# Search beaches by state (supports offset/limit pagination)
|
|
21
21
|
beaches = client.beaches.list(state="CA")
|
|
22
|
+
# Pagination: client.beaches.list(state="CA", offset=100, limit=50)
|
|
23
|
+
# Filter by country: client.beaches.list(country="Cambodia")
|
|
22
24
|
for b in beaches["data"]:
|
|
23
25
|
print(b["name"], b["state"])
|
|
24
26
|
|
|
@@ -30,12 +32,14 @@ print(f"Found {malibu['count']} beaches matching 'Malibu'")
|
|
|
30
32
|
beach = client.beaches.get(372)
|
|
31
33
|
print(beach["data"]["name"], beach["data"]["beach_day_score"])
|
|
32
34
|
|
|
33
|
-
# Get current conditions
|
|
35
|
+
# Get current conditions (supports offset/limit)
|
|
34
36
|
conditions = client.beaches.conditions(372)
|
|
37
|
+
# Pagination: client.beaches.conditions(372, offset=30, limit=15)
|
|
35
38
|
print(conditions["data"]["water_quality_grade"])
|
|
36
39
|
|
|
37
|
-
# Get top-scored beaches
|
|
40
|
+
# Get top-scored beaches (supports offset/limit)
|
|
38
41
|
scored = client.beaches.scored(min_score=70, limit=10)
|
|
42
|
+
# Pagination: client.beaches.scored(offset=50, limit=25)
|
|
39
43
|
for b in scored["data"]:
|
|
40
44
|
print(f"{b['name']}: {b['beach_day_score']}")
|
|
41
45
|
|
|
@@ -111,6 +111,7 @@ class BeachEndpoints:
|
|
|
111
111
|
def list(
|
|
112
112
|
self,
|
|
113
113
|
state: Optional[str] = None,
|
|
114
|
+
country: Optional[str] = None,
|
|
114
115
|
search: Optional[str] = None,
|
|
115
116
|
limit: Optional[int] = None,
|
|
116
117
|
offset: Optional[int] = None,
|
|
@@ -119,12 +120,14 @@ class BeachEndpoints:
|
|
|
119
120
|
|
|
120
121
|
Args:
|
|
121
122
|
state: Two-letter US state code or 'AU-NSW'/'AU-VIC'.
|
|
123
|
+
country: Country name (e.g. 'Cambodia', 'Vietnam', 'Thailand').
|
|
122
124
|
search: Search term for beach name.
|
|
123
125
|
limit: Max results per page.
|
|
124
126
|
offset: Pagination offset.
|
|
125
127
|
"""
|
|
126
128
|
return self._client._get("/beaches", {
|
|
127
129
|
"state": state,
|
|
130
|
+
"country": country,
|
|
128
131
|
"search": search,
|
|
129
132
|
"limit": limit,
|
|
130
133
|
"offset": offset,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: beachdayapi
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: Python client for the Beach Day API — real-time beach and surf conditions
|
|
5
5
|
Author-email: Beach Day API <hello@beachdayapi.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -28,7 +28,7 @@ Description-Content-Type: text/markdown
|
|
|
28
28
|
[](https://pypi.org/project/beachdayapi/)
|
|
29
29
|
[](https://opensource.org/licenses/MIT)
|
|
30
30
|
|
|
31
|
-
Python client for the [Beach Day API](https://beachdayapi.com) — water quality, weather, tides, ocean conditions, beach rules, amenities, and composite scoring in a single call. Covers 4,
|
|
31
|
+
Python client for the [Beach Day API](https://beachdayapi.com) — water quality, weather, tides, ocean conditions, beach rules, amenities, and composite scoring in a single call. Covers 4,500+ beaches across the US, Australia, South Africa, and Spain.
|
|
32
32
|
|
|
33
33
|
```bash
|
|
34
34
|
pip install beachdayapi
|
|
@@ -41,8 +41,10 @@ from beachdayapi import BeachDayAPI
|
|
|
41
41
|
|
|
42
42
|
client = BeachDayAPI("bda_your_api_key")
|
|
43
43
|
|
|
44
|
-
# Search beaches by state
|
|
44
|
+
# Search beaches by state (supports offset/limit pagination)
|
|
45
45
|
beaches = client.beaches.list(state="CA")
|
|
46
|
+
# Pagination: client.beaches.list(state="CA", offset=100, limit=50)
|
|
47
|
+
# Filter by country: client.beaches.list(country="Cambodia")
|
|
46
48
|
for b in beaches["data"]:
|
|
47
49
|
print(b["name"], b["state"])
|
|
48
50
|
|
|
@@ -54,12 +56,14 @@ print(f"Found {malibu['count']} beaches matching 'Malibu'")
|
|
|
54
56
|
beach = client.beaches.get(372)
|
|
55
57
|
print(beach["data"]["name"], beach["data"]["beach_day_score"])
|
|
56
58
|
|
|
57
|
-
# Get current conditions
|
|
59
|
+
# Get current conditions (supports offset/limit)
|
|
58
60
|
conditions = client.beaches.conditions(372)
|
|
61
|
+
# Pagination: client.beaches.conditions(372, offset=30, limit=15)
|
|
59
62
|
print(conditions["data"]["water_quality_grade"])
|
|
60
63
|
|
|
61
|
-
# Get top-scored beaches
|
|
64
|
+
# Get top-scored beaches (supports offset/limit)
|
|
62
65
|
scored = client.beaches.scored(min_score=70, limit=10)
|
|
66
|
+
# Pagination: client.beaches.scored(offset=50, limit=25)
|
|
63
67
|
for b in scored["data"]:
|
|
64
68
|
print(f"{b['name']}: {b['beach_day_score']}")
|
|
65
69
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|