Command name: user_dictionary
Here is a list of all possible parameters and values that can be used with the user_dictionary command.
# | Parameter | Possible Values | Default value | Description |
---|---|---|---|---|
1 | format |
| json | The response format for output data. |
2 | callback |
| A callback function name that will be used to manipulate the JSON data received from the server. Such an approach enables sharing of data bypassing same-origin policy. It can be used only along with “format=json”. | |
3 | action |
| An action that can be used to manipulate a user dictionary. |
Here is a list of all possible parameters and values that can be used with the user_dictionary action parameter.
# | Action parameter | Parameters | Possible values | Description |
---|---|---|---|---|
1 | create | name |
| Create a new user dictionary. |
wordlist |
| |||
2 | delete | name |
| Delete a selected user dictionary. |
3 | rename | name |
| Rename a specified dictionary and sets a new name. |
new_name |
| |||
4 | check | name |
| Check if a specified user dictionary exists on the server. |
5 | getdict | name |
| Request content of a specified user dictionary. The getdict action is available only for the JSON format. |
6 | addwords | name |
| Add new words to a specified user dictionary. |
word |
| |||
wordlist |
| V5.28.0 | ||
7 | deletewords | name |
| Remove words from a specified user dictionary. |
word |
| |||
wordlist |
| V5.28.0 | ||
8 | editword | name |
| Replace a word in a specified user dictionary with a new one. |
word |
| |||
new_word |
|
Example 1 [GET]: Create user dictionary (Output in XML)
Request URL (GET):
https://svc.webspellchecker.net/api?cmd=user_dictionary&format=xml&action=create&name=user_dictionary&wordlist=SCAYT,SpellCheckAsYouType,WSC,WebSpellChecker,WProofreader&customerid=[your-service-id]
Parameters:
- Command: user_dictionary
- Action: create
- Name: user_dictionary
- Wordlist: SCAYT, SpellCheckAsYouType, WSC, WebSpellChecker, WProofreader
- Format: XML
Request response:
<user_dictionary> <name>user_dictionary</name> <action>create</action> <wordlist> <word>SCAYT</word> <word>SpellCheckAsYouType</word> <word>WSC</word> <word>WebSpellChecker</word> <word>WProofreader</word> </wordlist> <modificationTime>1571762101</modificationTime> </user_dictionary>
Example 2 [GET]: Get user dictionary content (Output in JSON)
Request URL (GET):
https://svc.webspellchecker.net/api?cmd=user_dictionary&format=json&action=getdict&name=user_dictionary&customerid=[your-service-id]
Parameters:
- Command: user_dictionary
- Action: getdict
- Name: user_dictionary
- Format: json
Request response:
{ "name": "user_dictionary", "action": "getdict", "wordlist": [ "SCAYT", "SpellCheckAsYouType", "WSC", "WebSpellChecker", "WProofreader" ], "modificationTime": 1571762101 }
The GET request size is 2048 symbols.
Example 3 [POST]: Get user dictionary content (Output in JSON)
Using the same request and parameters as described in example 4.2 but form it as a POST request.
Request URL (POST):
https://svc.webspellchecker.net/api?
Body (Raw):
cmd=user_dictionary&format=json&action=getdict&name=user_dictionary&customerid=[your-service-id]
Request response:
{ "name": "user_dictionary", "action": "getdict", "wordlist": [ "SCAYT", "SpellCheckAsYouType", "WSC", "WebSpellChecker", "WProofreader" ], "modificationTime": 1571762101 }