a4d548941e83be736cd9795be397dc0bba7c5dbb,monkeylearn/classification.py,Categories,edit,#Categories#Any#Any#Any#Any#Any#,192
Before Change
return MonkeyLearnResponse(response.json()["result"], [response])
def edit(self, module_id, category_id, name=None, parent_id=None, sleep_if_throttled=True):
url = self.endpoint + module_id + "/categories/" + str(category_id) + "/"
data = {
"name": name,
"parent_id": parent_id
}
data = {key: value for key, value in six.iteritems(data) if value is not None}
response = self.make_request(url, "PATCH", data, sleep_if_throttled)
self.handle_errors(response)
return MonkeyLearnResponse(response.json()["result"], [response])
def delete(self, module_id, category_id, samples_strategy=None, samples_category_id=None,
sleep_if_throttled=True):
url = self.endpoint + module_id + "/categories/" + str(category_id) + "/"
After Change
"name": name,
"parent_id": parent_id
})
url = self.get_nested_detail_url(model_id, tag_id)
response = self.make_request("PATCH", url, data, retry_if_throttled=retry_if_throttled)
return MonkeyLearnResponse(response)
def delete(self, model_id, tag_id, move_data_to=None, retry_if_throttled=True):
data = self.remove_none_value({
"move_data_to": move_data_to,
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 15
Instances
Project Name: monkeylearn/monkeylearn-python
Commit Name: a4d548941e83be736cd9795be397dc0bba7c5dbb
Time: 2018-05-28
Author: gonzalosaavedra@gmail.com
File Name: monkeylearn/classification.py
Class Name: Categories
Method Name: edit
Project Name: monkeylearn/monkeylearn-python
Commit Name: a4d548941e83be736cd9795be397dc0bba7c5dbb
Time: 2018-05-28
Author: gonzalosaavedra@gmail.com
File Name: monkeylearn/classification.py
Class Name: Categories
Method Name: edit
Project Name: monkeylearn/monkeylearn-python
Commit Name: a4d548941e83be736cd9795be397dc0bba7c5dbb
Time: 2018-05-28
Author: gonzalosaavedra@gmail.com
File Name: monkeylearn/classification.py
Class Name: Categories
Method Name: detail
Project Name: monkeylearn/monkeylearn-python
Commit Name: a4d548941e83be736cd9795be397dc0bba7c5dbb
Time: 2018-05-28
Author: gonzalosaavedra@gmail.com
File Name: monkeylearn/classification.py
Class Name: Categories
Method Name: create