Skip to content

Commit

Permalink
Merge pull request #19 from docentYT/development
Browse files Browse the repository at this point in the history
v1.1.1
  • Loading branch information
docentYT authored Aug 3, 2023
2 parents 8d5d3c8 + 4c8efe4 commit 3f01b9a
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.1.1]
### Fixed
- Corrected character when adding parameters in endpoint `api.notes.get_bbox()` (from `?` to `&`).
- Fixed the `limit` parameter restrictions in `api.notes.get_bbox()` documentation.

## [1.1.0]
### Added
- `limit` parameter for `api.changeset.get_query()` endpoint.
Expand Down
2 changes: 1 addition & 1 deletion src/osm_easy_api/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = "1.1.0"
VERSION = "1.1.1"

from .data_classes import *
from .diff import Diff, Frequency
Expand Down
2 changes: 1 addition & 1 deletion src/osm_easy_api/api/_URLs.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def __init__(self, base_url: str):

self.note: Dict[str, str] = {
"get": six_url + "/notes/{id}",
"get_bbox": six_url + "/notes?bbox={left},{bottom},{right},{top}?limit={limit}?closed={closed_days}",
"get_bbox": six_url + "/notes?bbox={left},{bottom},{right},{top}&limit={limit}&closed={closed_days}",
"create": six_url + "/notes?lat={latitude}&lon={longitude}&text={text}",
"comment": six_url + "/notes/{id}/comment?text={text}",
"close": six_url + "/notes/{id}/close",
Expand Down
2 changes: 1 addition & 1 deletion src/osm_easy_api/api/endpoints/notes.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def get_bbox(self, left: str, bottom: str, right: str, top: str, limit: int = 10
bottom (str): Bottom bbox
right (str): Right bbox
top (str): Top bbox
limit (int, optional): Max number of notes (1 < limit < 1000). Defaults to 100.
limit (int, optional): Max number of notes (1 < limit < 10000). Defaults to 100.
closed_days (int, optional): Number of days a note needs to be closed to no longer be returned (0 - only open, -1 - all). Defaults to 7.
Raises:
Expand Down
4 changes: 2 additions & 2 deletions tests/api/test_api_notes.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def test_get_bbox(self):
</osm>"""
responses.add(**{
"method": responses.GET,
"url": "https://test.pl/api/0.6/notes?bbox=20.4345,52.2620,20.5608,52.2946?limit=100?closed=7",
"url": "https://test.pl/api/0.6/notes?bbox=20.4345,52.2620,20.5608,52.2946&limit=100&closed=7",
"body": body,
"status": 200
})
Expand All @@ -108,7 +108,7 @@ def test_get_bbox(self):

responses.add(**{
"method": responses.GET,
"url": "https://test.pl/api/0.6/notes?bbox=20.4345,52.2620,20.5608,52.2946?limit=100?closed=7",
"url": "https://test.pl/api/0.6/notes?bbox=20.4345,52.2620,20.5608,52.2946&limit=100&closed=7",
"body": body,
"status": 400
})
Expand Down

0 comments on commit 3f01b9a

Please sign in to comment.