Migrating

The breaking changes included in this version aim to make evrythng-scan.js and the corresponding API service more explicit and flexible for developers:

The SDK no longer creates implicit scan actions and scan actions automagically. The developer is now in control of the scanning flow, determining what type of action to do (e.g. create a _register custom action with custom fields) and when (e.g. process the results before creating action and/or redirecting to another URL):

Implicit scan actions are the result of an implicit server redirection when getting the thng/product short url (tn.gg/xxx). This can be achieved by calling app.redirect(result.redirections[0]).

Explicit actions are defined by the developer according to the application's business logic. These can made by calling result.thng.action('_register').create(<customAction>) (the previous default type was 'scans').

The results format is now consistent with the API service response and easier to reason about. It is the same regardless of options and number of matched results.

The external spinner library is no longer bundled in the SDK. Developers must use their own visual hint for the loading state, or include the previous spinner library explicitly (see Spinner).