Fix docs around execHaloCmdRN() (#63)

This commit is contained in:
Michał Leszczyński
2023-03-03 18:28:56 +01:00
committed by GitHub
parent a4a17f0fa7
commit 759c934ff2
3 changed files with 7 additions and 17 deletions

View File

@@ -40,7 +40,7 @@ For React Native mobile applications (Android/iOS) based on `react-native-nfc-ma
**Guides:**
* [Using libhalo within a React Native mobile application for Android/iOS](https://github.com/arx-research/libhalo/blob/master/docs/mobile-react-native.md)
* [Documentation of the initNFCManagerHalo, execHaloCmd API](https://github.com/arx-research/libhalo/blob/master/docs/api-react-native.md)
* [Documentation of the execHaloCmdRN API](https://github.com/arx-research/libhalo/blob/master/docs/api-react-native.md)
* [Documentation of the utility functions exposed by LibHaLo](https://github.com/arx-research/libhalo/blob/master/docs/api-utils.md)
### (Desktop) execHaloCmdPCSC

View File

@@ -1,29 +1,19 @@
# API method initNFCManagerHalo, execHaloCmd
# API method execHaloCmdRN
## Importing the method
```javascript
import {initNFCManagerHalo, execHaloCmd} from '@arx-research/libhalo';
import {execHaloCmdRN} from '@arx-research/libhalo';
```
## initNFCManagerHalo - Call specification
## Call specification
```javascript
async function initNFCManagerHalo(nfcManager)
async function execHaloCmdRN(nfcManager, command, options)
```
### Input parameter: `nfcManager`
The `NfcManager` singleton instance as imported from `react-native-nfc-manager` library.
### Return value
The function will return a Promise that will resolve to an object.
You should store this object in order to pass it as an argument to `execHaloCmd()` call.
## execHaloCmd - Call specification
```javascript
async function execHaloCmd(command, options)
```
### Input parameter: `command`
An object specifying the command name that you want to invoke, together with the additional command's arguments.
@@ -31,7 +21,7 @@ Please check [documentation of the available commands (HaLo Command Set)](/docs/
### Input parameter: `options`
An object returned from `initNFCManagerHalo` async call.
Optional. An empty object.
### Return value

View File

@@ -103,5 +103,5 @@ Please check GitHub [arx-research/libhalo-example-react-native](https://github.c
## Advanced usage
* [Documentation of the initNFCManagerHalo API](/docs/api-react-native.md)
* [Documentation of the execHaloCmdRN API](/docs/api-react-native.md)
* [Documentation of the available commands (HaLo Command Set)](/docs/halo-command-set.md)