Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 2 additions & 35 deletions src/tutorials/client-side-konnector/clisk-creation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,6 @@

In this section you will learn how to develop your own konnector from the [CliSK template](https://github.com/konnectors/template_ccc).

### Introduction to Client-Side Konnectors (CliSK)

A CliSK is a type of konnector using a webview to simulate a browser into the Twake App. It's allowing the developer to interact directly on the website via a script or by giving back the control to the user when needed. Very useful to bypass bot detection by inducing a real human interaction on the website on sensible phases such as login, 2FA or any type of captcha.

### CliSK architecture

##### How does it work ?

The CliSK contains two webviews.

- One called `pilot`
- Second called `worker`
We will use those names during the tutorial, as it is part of mandatory understanding to make your konnector.

###### Pilot

The `pilot` webview is here to ensure the communication between the worker (navigating the web) and the Twake App. It "pilots" (clever, right ?) the worker's actions and gives back the result to the Twake App. It also keeps the state of the konnector execution.

###### Worker

The `worker` webview is like a very simple browser. It will navigate, interact, fill, scrap, intercept requests ... Pretty much the big part of the execution. It will return everything to the `pilot` in the end. That's the one you will be seeing when developing your konnector.

###### Store

It allows the developer to store data if needed like request's responses with interesting data, or scraped data that will be useful further down the execution

###### Library

The used library for CliSK development is the [cozy-clisk](https://github.com/konnectors/libs/tree/master/packages/cozy-clisk) library.
We will cover it all in a [dedicated documentation](./clisk-lib-doc.md)

---

### Creating a CliSK for "books.toscrape.com"

#### Creating your own CliSK
Expand Down Expand Up @@ -145,9 +112,9 @@ Then, clean the template's code, but keep the main functions launch by the pilot
- `getUserDataFromWebsite`
- `fetch`

Those will be the minimum mandatory functions launch by the Twake App to execute your code.
Those will be the minimum mandatory functions launch by the Twake mobile App to execute your code.

⚠️ Note : You won't need to call them explicitly anywhere in the code as the Twake App call them itself. However you will _need_ to override them to fit the wanted flow for the targeted website.
⚠️ Note : You won't need to call them explicitly anywhere in the code as the Twake mobile App call them itself. However you will _need_ to override them to fit the wanted flow for the targeted website.

When done, your Class in `src/index.js` file should look like this :

Expand Down
Loading