Skip to content

Commit 81be6f0

Browse files
authored
Merge pull request #167 from MSameerAbbas/main
Fixed org_id vs organization_id mismatch
2 parents e14ff00 + 5ddb458 commit 81be6f0

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/mapillary/controller/image.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,9 @@ def get_image_close_to_controller(
145145
# Filter using kwargs.organization_id
146146
{
147147
"filter": "organization_id",
148-
"organization_ids": kwargs["org_id"],
148+
"organization_ids": kwargs["organization_id"],
149149
}
150-
if "org_id" in kwargs
150+
if "organization_id" in kwargs
151151
else {},
152152
# Filter using kwargs.radius
153153
{
@@ -654,7 +654,7 @@ def geojson_features_controller(
654654
# Filter using filters.organization_id
655655
{
656656
"filter": "organization_id",
657-
"organization_ids": filters["org_id"],
657+
"organization_ids": filters["organization_id"],
658658
}
659659
if "organization_id" in filters
660660
else {},
@@ -826,7 +826,7 @@ def shape_features_controller(
826826
# Filter using filters.organization_id
827827
{
828828
"filter": "organization_id",
829-
"organization_ids": filters["org_id"],
829+
"organization_ids": filters["organization_ids"],
830830
}
831831
if "organization_id" in filters
832832
else {},

src/mapillary/interface.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,9 @@ def get_image_close_to(latitude=-122.1504711, longitude=37.485073, **kwargs):
121121
:param kwargs.max_captured_at: The max date. Format from 'YYYY', to 'YYYY-MM-DDTHH:MM:SS'
122122
:type kwargs.max_captured_at: str
123123
124-
:param kwargs.org_id: The organization id, ID of the organization this image (or sets of
124+
:param kwargs.organization_id: The organization id, ID of the organization this image (or sets of
125125
images) belong to. It can be absent. Thus, default is -1 (None)
126-
:type kwargs.org_id: int
126+
:type kwargs.organization_id: int
127127
128128
:return: GeoJSON
129129
:rtype: dict
@@ -444,7 +444,7 @@ def sequences_in_bbox(bbox: dict, **filters) -> str:
444444
- max_captured_at
445445
- min_captured_at
446446
- image_type: pano, flat, or all
447-
- org_id
447+
- organization_id
448448
449449
:type filters: dict
450450
@@ -467,7 +467,7 @@ def sequences_in_bbox(bbox: dict, **filters) -> str:
467467
... max_captured_at='YYYY-MM-DD HH:MM:SS',
468468
... min_captured_at='YYYY-MM-DD HH:MM:SS',
469469
... image_type='pano',
470-
... org_id='ORG_ID'
470+
... organization_id='ORG_ID'
471471
... )
472472
"""
473473

0 commit comments

Comments
 (0)