Skip to content

Commit bc7b57c

Browse files
authored
Merge pull request #59 from osmlab/dev
Merging dev -> master
2 parents bee5aa9 + 3d00444 commit bc7b57c

4 files changed

Lines changed: 27 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file. Dates are d
44

55
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
66

7+
#### [v1.2.1](https://github.com/osmlab/maproulette-python-client/compare/v1.2.0...v1.2.1)
8+
9+
> 24 June 2020
10+
11+
- Merging dev > master [`#49`](https://github.com/osmlab/maproulette-python-client/pull/49)
12+
- Add changelog [`#47`](https://github.com/osmlab/maproulette-python-client/pull/47)
13+
- Fixed challenge model issue [`#48`](https://github.com/osmlab/maproulette-python-client/pull/48)
14+
- add changelog [`a735e45`](https://github.com/osmlab/maproulette-python-client/commit/a735e45693dad6ea501ccfefbaced77d3fd3ab63)
15+
- Update __init__.py [`dbdf591`](https://github.com/osmlab/maproulette-python-client/commit/dbdf5911762f7de01dfe1c4bf350a835794e43bb)
16+
717
#### [v1.2.0](https://github.com/osmlab/maproulette-python-client/compare/v1.1.0...v1.2.0)
818

919
> 24 June 2020

maproulette/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
from .api.task import Task
1515
from .api.user import User
1616

17-
__version__ = '1.2.1'
17+
__version__ = '1.3.1'

maproulette/api/challenge.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ def update_challenge(self, challenge_id, data):
302302
if self.is_challenge_model(data):
303303
data = ChallengeModel.to_dict(data)
304304
response = self.put(
305-
endpoint=f"/challenge{challenge_id}",
305+
endpoint=f"/challenge/{challenge_id}",
306306
body=data)
307307
return response
308308

maproulette/models/challenge.py

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -296,13 +296,22 @@ def remote_geojson(self):
296296
def remote_geojson(self, value):
297297
self._remote_geojson = value
298298

299+
@property
300+
def keywords(self):
301+
"""A string or list of strings pertaining to the keywords of this challenge"""
302+
return self._keywords
303+
304+
@keywords.setter
305+
def keywords(self, value):
306+
self._keywords = value
307+
299308
def __init__(self, name, id=None, description=None, parent=None, instruction=None, difficulty=None, blurb=None,
300309
enabled=None, challenge_type=None, featured=None, overpassQL=None, default_priority=None,
301310
high_priority_rule=None, medium_priority_rule=None, low_priority_rule=None, default_zoom=None, min_zoom=None, max_zoom=None,
302311
osm_id_property=None, cooperative_type=None, popularity=None, check_in_comment=None,
303312
check_in_source=None, requires_local=None, default_basemap=None, default_basemap_id=None,
304313
custom_basemap=None, update_tasks=None, exportable_properties=None, preferred_tags=None,
305-
task_styles=None, remote_geojson=None):
314+
task_styles=None, remote_geojson=None, keywords=None):
306315
self._id = id
307316
self._name = name
308317
self._description = description
@@ -335,6 +344,7 @@ def __init__(self, name, id=None, description=None, parent=None, instruction=Non
335344
self._preferred_tags = preferred_tags
336345
self._task_styles = task_styles
337346
self._remote_geojson = remote_geojson
347+
self._keywords = keywords
338348

339349
def to_dict(self):
340350
"""Converts all non-null properties of a challenge object into a dictionary"""
@@ -360,8 +370,8 @@ def to_dict(self):
360370
"osmIdProperty": self._osm_id_property,
361371
"cooperativeType": self._cooperative_type,
362372
"popularity": self._popularity,
363-
"checkInComment": self._check_in_comment,
364-
"checkInSource": self._check_in_source,
373+
"checkinComment": self._check_in_comment,
374+
"checkinSource": self._check_in_source,
365375
"requiresLocal": self._requires_local,
366376
"defaultBasemap": self._default_basemap,
367377
"defautlBasemapId": self._default_basemap_id,
@@ -370,7 +380,8 @@ def to_dict(self):
370380
"exportableProperties": self._exportable_properties,
371381
"preferredTags": self._preferred_tags,
372382
"taskStyles": self._task_styles,
373-
"remoteGeoJson": self.remote_geojson
383+
"remoteGeoJson": self._remote_geojson,
384+
"tags": self._keywords
374385
}
375386
return {k: v for (k, v) in properties.items() if v is not None}
376387

0 commit comments

Comments
 (0)