Command name: user_dictionary

Here is a list of all possible parameters and values that can be used with the user_dictionary command.

#ParameterPossible ValuesDefault valueDescription
1format
  • json
  • xml
jsonThe response format for output data.
2callback
  • callback function name

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”.
3action
  • create – Create a new user dictionary.
  • rename – Rename an existing user dictionary.
  • delete – Delete an existing user dictionary.
  • addwords – Add new words to a specified user dictionary.
  • deletewords – Remove words from a specified user dictionary.
  • editword – Edit a word in a specified user dictionary.
  • check – Check if a specified user dictionary exists on the server.
  • getdict – Get content from a specified user dictionary (for JSON only).

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 parameterParametersPossible valuesDescription
1createname
  • name of a new user dictionary
Create a new user dictionary.
wordlist
  • comma-separated words which will be added to a new dictionary
2deletename
  • name of a selected user dictionary
Delete a selected user dictionary.
3renamename
  • name of a selected user dictionary
Rename a specified dictionary and sets a new name.
new_name
  • a new name for a chosen user dictionary
4checkname
  • name of a chosen user dictionary
Check if a specified user dictionary exists on the server.
5getdictname
  • name of a required user dictionary
Request content of a specified user dictionary. The getdict action is available only for the JSON format.
6addwordsname
  • name of a chosen user dictionary
Add new words to a specified user dictionary.
word
  • a new word which will be added to a specified user dictionary

wordlist
  • a list of coma-separated words (also possible to add just one word)

V5.28.0

7deletewordsname
  • name of a chosen user dictionary
Remove words from a specified user dictionary.
word
  • word which will be removed from a specified user dictionary

wordlist
  • a list of coma-separated words (also possible to remove just one word)

V5.28.0

8editwordname
  • name of a chosen user dictionary
Replace a word in a specified user dictionary with a new one.
word
  • word which will be edited
new_word
  • a new word which replaces a word picked for editing

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
}