diff --git a/en/application-dev/reference/apis/js-apis-system-parameter.md b/en/application-dev/reference/apis/js-apis-system-parameter.md index c111c6c2cbfa5e809816b3246a28ac8114e35f76..c068d0429fcd2aa1ee91fb3dd145ee32296274e8 100644 --- a/en/application-dev/reference/apis/js-apis-system-parameter.md +++ b/en/application-dev/reference/apis/js-apis-system-parameter.md @@ -1,6 +1,7 @@ # System Parameter -> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** +> **NOTE**
+> > - The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version. > - This is a system API and cannot be called by third-party applications. @@ -24,7 +25,7 @@ Obtains the value of the attribute with the specified key. | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | | key | string | Yes| Key of the system attribute.| -| def | string | No| Default Value| +| def | string | No| Default value.| **Return value** @@ -48,7 +49,7 @@ try { get(key: string, callback: AsyncCallback<string>): void -Obtains the value of the attribute with the specified key. This API uses an asynchronous callback to return the result. +Obtains the value of the attribute with the specified key. **System capability**: SystemCapability.Startup.SysInfo @@ -79,7 +80,7 @@ try { get(key: string, def: string, callback: AsyncCallback<string>): void -Obtains the value of the attribute with the specified key. This API uses an asynchronous callback to return the result. +Obtains the value of the attribute with the specified key. **System capability**: SystemCapability.Startup.SysInfo @@ -112,7 +113,7 @@ try { get(key: string, def?: string): Promise<string> -Obtains the value of the attribute with the specified key. This API uses a promise to return the result. +Obtains the value of the attribute with the specified key. **System capability**: SystemCapability.Startup.SysInfo @@ -171,11 +172,11 @@ try { ``` -## parameter.set(key: string, value: string, callback: AsyncCallback<void>) +## parameter.set set(key: string, value: string, callback: AsyncCallback<void>): void -Sets a value for the attribute with the specified key. This API uses an asynchronous callback to return the result. +Sets a value for the attribute with the specified key. **System capability**: SystemCapability.Startup.SysInfo @@ -184,7 +185,7 @@ Sets a value for the attribute with the specified key. This API uses an asynchro | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | | key | string | Yes| Key of the system attribute.| -| def | string | Yes| Default Value| +| value | string | Yes| System attribute value to set.| | callback | AsyncCallback<void> | Yes| Callback used to return the result.| **Example** @@ -203,11 +204,11 @@ try { ``` -## parameter.set(key: string, def?: string) +## parameter.set -set(key: string, def?: string): Promise<string> +set(key: string, value: string): Promise<void> -Sets a value for the attribute with the specified key. This API uses a promise to return the result. +Sets a value for the attribute with the specified key. **System capability**: SystemCapability.Startup.SysInfo @@ -216,13 +217,13 @@ Sets a value for the attribute with the specified key. This API uses a promise t | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | | key | string | Yes| Key of the system attribute.| -| def | string | No| Default Value| +| value| string | Yes| System attribute value to set.| **Return value** | Type| Description| | -------- | -------- | -| Promise<string> | Promise used to return the execution result.| +| Promise<void> | Promise used to return the execution result.| **Example**