2.2.2 • Published 14 days ago

oarocamera v2.2.2

Weekly downloads
-
License
-
Repository
-
Last release
14 days ago

Installation

To use this package in your project, follow these steps:

  1. Install the package using npm:

    npm install oarocamera
  2. Import the package in your code:

    import { OarocameraService } from 'oarocamera';
  3. Construct the service by injecting it into your component's constructor:
    ```
    constructor(private oarocameraService: OarocameraService) { }
    Now you have the package installed and ready to use in your project.

Usage

Once the oarocamera service is injected, it must be started with the following method

await this.oarocameraService.init({
      apiUrl: 'https://api_domain_here',
      secret: 'your_secret',
      apikey: 'your_api_key',
      buttonStartId: 'btn-start',
      resultContainerId: 'test'
});
Configuration Options

Here are the configuration options available when initializing the OarocameraService:

  • buttonStartId: The ID of the button that initiates the process when clicked.
  • resultContainerId: The ID of a container to display the results of the service.
  • apiUrl: The URL of the API (domain not shown in README).
  • apikey: The api key that oaro provided.
  • secret: Secret that oaro provided.

OCR process

With the following method the ocr process starts:

 this.oarocameraService.ocrFront({
    onResult: this.onResultOcr,
    beforeSend: this.beforeSend
});
Configuration Options

Here are the configuration options available for the ocr method:

  • onResult: A callback function that executes at the end of the process.
  • beforeSend: A function that executes during the process.

If the requireRearSide parameter in the response is true, you must call the following method:

 this.oarocameraService.ocrBack();

Biometric process

With the following method the biometric process starts:

this.oarocameraService.biometric({
    onResult: this.onResult,
    beforeSend: this.beforeSend,
    token: token
})
Configuration Options

Here are the configuration options available for the biometric method:

  • onResult: A callback function that executes at the end of the process.
  • beforeSend: A function that executes during the process.
  • token: The token received in the ocr method.

Clearing the Process

You can use the this.oarocameraService.clearProcess() method to clear the HTML container and reset the API to its initial state. This is useful for starting a new process or cleaning up the container for a fresh interaction.

this.oarocameraService.clearProcess();

Feel free to use these methods as part of your integration with the service.

License

This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0).

CC BY-NC License

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.

This means you are free to:

  • Share: Copy and redistribute the material in any medium or format.
  • Adapt: Remix, transform, and build upon the material.

Under the following terms:

  • Attribution: You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • NonCommercial: You may not use the material for commercial purposes.

See the LICENSE file for more details about the CC BY-NC License.

Support and Contact

If you encounter any issues or have questions about this package, please don't hesitate to reach out to the administrator who provided you access to the repository. We welcome contributions and feedback.

That's it! You've successfully installed and set up the oarocamera package in your project. Happy coding!

2.2.1

14 days ago

2.2.0

14 days ago

2.1.4

14 days ago

2.2.2

14 days ago

2.1.3

14 days ago

2.1.5

14 days ago

2.1.2

2 months ago

2.1.1

2 months ago

2.1.0

2 months ago

2.0.2

4 months ago

2.0.1

4 months ago

2.0.0

4 months ago

1.1.0

8 months ago

1.0.0

8 months ago

0.0.1

8 months ago