Skip to content

Commit d656c46

Browse files
committed
Remove deprecated parent_id param
1 parent a180123 commit d656c46

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ response = ml.classifiers.tags.detail('[MODEL_ID]', TAG_ID)
439439

440440

441441
```python
442-
def MonkeyLearn.classifiers.tags.create(model_id, name, parent_id=None, retry_if_throttled=True)
442+
def MonkeyLearn.classifiers.tags.create(model_id, name, retry_if_throttled=True)
443443
```
444444

445445
Parameters:
@@ -448,7 +448,6 @@ Parameters:
448448
|--------------------|-------------------|-----------------------------------------------------------|
449449
|*model_id* |`str` |Classifier ID. It always starts with `'cl'`, for example, `'cl_oJNMkt2V'`. |
450450
|*name* |`str` |The name of the new tag. |
451-
|*parent_id* |`int` |**DEPRECATED** (only for v2 models). The ID of the parent tag. |
452451
|*retry_if_throttled* |`bool` |If a request is [throttled](https://monkeylearn.com/api/v3/#query-limits), sleep and retry the request. |
453452

454453
Example:
@@ -463,7 +462,7 @@ response = ml.classifiers.tags.create('[MODEL_ID]', 'Positive')
463462

464463

465464
```python
466-
def MonkeyLearn.classifiers.tags.edit(model_id, tag_id, name=None, parent_id=None,
465+
def MonkeyLearn.classifiers.tags.edit(model_id, tag_id, name=None,
467466
retry_if_throttled=True)
468467
```
469468

@@ -474,7 +473,6 @@ Parameters:
474473
|*model_id* |`str` |Classifier ID. It always starts with `'cl'`, for example, `'cl_oJNMkt2V'`. |
475474
|*tag_id* |`int` |Tag ID. |
476475
|*name* |`str` |The new name of the tag. |
477-
|*parent_id* |`int` |**DEPRECATED** (only for v2 models). The new parent tag ID. |
478476
|*retry_if_throttled* |`bool` |If a request is [throttled](https://monkeylearn.com/api/v3/#query-limits), sleep and retry the request. |
479477

480478
Example:

monkeylearn/classification.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,19 +134,17 @@ def detail(self, model_id, tag_id, retry_if_throttled=True):
134134
response = self.make_request('GET', url, retry_if_throttled=retry_if_throttled)
135135
return MonkeyLearnResponse(response)
136136

137-
def create(self, model_id, name, parent_id=None, retry_if_throttled=True):
137+
def create(self, model_id, name, retry_if_throttled=True):
138138
data = self.remove_none_value({
139139
'name': name,
140-
'parent_id': parent_id
141140
})
142141
url = self.get_nested_list_url(model_id)
143142
response = self.make_request('POST', url, data, retry_if_throttled=retry_if_throttled)
144143
return MonkeyLearnResponse(response)
145144

146-
def edit(self, model_id, tag_id, name=None, parent_id=None, retry_if_throttled=True):
145+
def edit(self, model_id, tag_id, name=None, retry_if_throttled=True):
147146
data = self.remove_none_value({
148147
'name': name,
149-
'parent_id': parent_id
150148
})
151149
url = self.get_nested_detail_url(model_id, tag_id)
152150
response = self.make_request('PATCH', url, data, retry_if_throttled=retry_if_throttled)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
setup(
1212
name='monkeylearn',
13-
version='3.5.1',
13+
version='3.5.2',
1414
author='MonkeyLearn',
1515
author_email='hello@monkeylearn.com',
1616
description='Official Python client for the MonkeyLearn API',

0 commit comments

Comments
 (0)