Difference between revisions of "DeleteTerm"
(→Returned value) |
(No difference)
|
Revision as of 13:02, 19 March 2015
Contents
DeleteTerm
deleteTerm (string key, int cmd, int gloId, string termId)
Delete a terminology entry in the given glossary.
Parameters
key | string | a valid API Key, generated by making a share at www.freetm.com |
cmd | int | command number is 53 |
gloId | int | glossary ID |
termId | string | term ID coming from the last recent search. CAUTION, a search must done before deleting to get a valid termId. |
Returned value
success | boolean | result of the command (true or false) |
error | string | error message |
Request example
json post with javascript
var data = {}; data["key"] = "example@key"; data["cmd"] = 53; data["gloId"] = 1; data["termId"] = "88474b70-5f70-11e4-aad0-5c539f6f39a2"; var xhr = new XMLHttpRequest(); xhr.open("POST", "www.freetm.com/wfa/api", true); xhr.setRequestHeader("Content-Type", "application/json;charset=UTF-8"); xhr.send(JSON.stringify(data));
post
<form action="www.freetm./wfa/api" method="post"> Key: <input type="text" id="key" name="key" value="example@key"/> Command: <input type="text" id="cmd" name="cmd" value="53"/> Glo Id: <input type="text" id="gloId" name="gloId"/> Term Id: <input type="text" id="termId" name="termId"/> <input type="submit" value="Submit"> </form>
get
www.freetm.com/wfa/api?key=example@key&cmd=53&gloId=1&termId=88474b70-5f70-11e4-aad0-5c539f6f39a2
Response example
json
{ "success": true ,"error": "" }
without white space (new line, carriage return or tabulation).
text
true true or an error message