Skip to content
This repository was archived by the owner on Jun 11, 2024. It is now read-only.

Commit 4081b67

Browse files
committed
change default API version to v2
1 parent cd46234 commit 4081b67

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

CHANGES.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
1.4 (unreleased)
22
-----------------
33

4-
- if :meth:`atomx.Atomx.post` returns a list, auto-convert list of objects
4+
- Change default API version to `v2`
5+
- If :meth:`atomx.Atomx.post` returns a list, auto-convert list of objects
56
to a list of :mod:`atomx.models` models. (Useful for `POST` to the `/domains` endpoint)
67

78

@@ -16,7 +17,7 @@
1617
- When saving a model, dates, sets and decimals get automatically converted
1718
to there json counterpart
1819
- Add `save_response` parameter to :class:`atomx.Atomx` to save the response meta data
19-
of the last api call.
20+
of the last api call
2021

2122
1.2
2223
---

atomx/__init__.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -352,9 +352,6 @@ def get(self, resource, *args, **kwargs):
352352
model = get_model_name(model_name)
353353
if model:
354354
if isinstance(res, list):
355-
if model_name.endswith('_list'):
356-
# special case for _list requests
357-
res = [{'id': id, 'name': name} for id, name in res]
358355
return [getattr(models, model)(self, **m) for m in res]
359356
return getattr(models, model)(self, **res)
360357
return res

atomx/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
VERSION = '1.4b'
2-
API_VERSION = 'v1'
2+
API_VERSION = 'v2'

docs/usage.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ optionally you can specify a different api endpoint for testing:
2121
2222
# create atomx session with sandbox endpoint
2323
atomx = Atomx('[email protected]', 'password',
24-
api_endpoint='https://sandbox.api.atomx.com/v1')
24+
api_endpoint='https://sandbox.api.atomx.com/v2')
2525
2626
2727
Fetching resources

0 commit comments

Comments
 (0)