KopeechkaS - wrapper around Kopeechka.store API



  • Name: KopeechkaS
    Version: 1.8
    Data: KopeechkaS.zip
    Source: -.
    Do you agree to include your module in BAS: Yes.
    Описание: Working with cloud-based inbox email service Kopeechka.store. Not an official module.

    Changelog:


    Ветка для русскоговорящих
    https://community.bablosoft.com/topic/19054/kopeechkas-модуль-для-работы-с-почтами-kopeechka-store


    Using the same email in multiple threads

    At the same time, unnecessary requests are not sent to the server.
    All emails data is stored in RAM, you can choose the storage model: local, global, resource.

    d3b081db-88fe-4ecb-b011-85671a0fa787-image.png

    local - Store locally. This threads emails will not be available to other threads.
    global - Store globally. All threads can access any email data in this storage.
    resource - Store in resource. Same as global model, but a bit slower.
    Storage models global and resource cannot be cleared automatically. To avoid memory leaks, it is necessary to close the email.
    The local storage model is cleared automatically when the thread ends.

    The code is designed to keep error rates to minimum

    Several categories of errors are present: common, fatal, ignored.
    Behavior can be reassigned, each error has its own ID.

    71702a1b-4c91-4924-9cc3-949c9a596a98-image.png

    Common errors - if they occur, the Fail action is called.
    Fatal errors - if they occur, the End Script action is called.
    Ignored errors are ignored.

    List of common error IDs:

    List of fatal error IDs:

    List of ignored error IDs:

    Strict mode

    By default, all actions run in strict mode.
    This means if any common error occurs, it will call the Fail action, as it should.
    However, if you disable strict mode - all common errors will be ignored.
    The action will continue to run until a successful result is achieved.
    If it was not possible to achieve a successful result within the allotted time, null will be returned.

    0f09a39e-bab7-435f-9cf3-72b324bdb596-image.png

    User-friendly interface

    Clear and intuitive, there are descriptions and examples.
    Some APIs are combined into one action.
    The functionality has been expanded.
    The standard colors of the constructor have been slightly changed to match the colors of the service.

    127107e4-42eb-4ee7-b8bd-941bc635f2a0-image.png

    cd406bba-e2a4-48a7-84db-6d1188b52ba8-image.png

    98e15fbd-08be-4914-8c92-33fe0c7e64dd-image.png

    Built-in debugger

    Informative and clear.
    Shows queries sent, time metrics in ms, errors text, etc.

    e732ff3e-e79b-4a0a-a01b-0d82e688ec2a-image.png

    Configuring requests delivery

    Enable/disable SSL usage.
    Individual for each action choice of waiting time and interval for sending requests.

    a684099a-2191-4a9b-8023-3bea94696570-image.png

    More

    • Work with multiple emails simultaneously, both globally and locally.
    • Applying settings globally (for all new threads).
    • Internal http client is used.
    • Standalone work with no additional dependencies.

    List of implemented APIs

    e6dfd2c4-02e7-4237-ab8b-722b2e7462f5-image.png


    The module is well tested on BAS version 24.3.1.
    Version 23.2.2 was also tested. No problems were found, but the functionality of outdated versions is not guaranteed.

    This module is not official, it is distributed on a non-commercial basis, in "as is" format.
    Modification and distribution on a commercial basis are prohibited.



  • For those who will be looking:

    You can change the default errors once and for all by editing the file internal/errors.js.

    This file contains an object that is a list of other objects:
    5d556461-55e4-4fca-86bc-997ac99b0e25-image.png

    ru - Russian error text
    en - English error text
    action - the action to be called for the specified error code
    fail - Fail
    die - End Script
    stop - Don't restart thread (Fail)
    instantly - Finish script instantly (End Script)



  • upd 1.1 - interface links updated



  • upd 1.2

    • Setting the maximum time of action execution is placed as a separate field Time threshold in the group "Requests delivery".

    You can now use variables/resources to set the maximum time.
    4e3b97a5-d851-4c9d-96a9-59ed7243cc99-image.png

    The API responsible for this has been changed slightly.
    For a smooth transition from an earlier version, use the Update project actions action in the drop-down menu at the top left.
    8111a24c-515d-403e-9c75-bd80db96cbbe-image.png

    Links to previous versions are in the header.



  • upd 1.3

    • Rare bug fixed


  • upd 1.4

    • Fixed bug when using variables in requests delivery group


  • upd 1.7

    • Fixed a bug that caused the internal result() function to be overridden


  • Just wanted to thank @Sadzurami for spending so much time and effort into making this for all of us. Thanks a ton sir!
    Appreciate ya!



  • upd 1.8

    • Added the ability to specify your soft_id when ordering mail. The setting is called "Dev id", located in "Get Email Address" > Options.
      1626b33b-6099-46c1-8fae-20778042b391-image.png

    • Fixed a bug when using the local mail storage during mail cancellation (didn't affect anything before, but was fixed).

    In addition, the module has a page on github. It will be cool if you put a star on the repository. Thank you.
    https://github.com/Sadzurami/KopeechkaS



  • Hi there.

    Brand new wrapper around kopeechka.store api is available now for nodejs and browsers.
    Feel free to use.

    git
    https://github.com/Sadzurami/kopeechka-store.git

    npm

    npm install @sadzurami/kopeechka-store
    

    yarn

    yarn add @sadzurami/kopeechka-store
    

    CDN

    <script src="https://cdn.jsdelivr.net/gh/Sadzurami/kopeechka-store@latest/kopeechka.min.js"></script>
    

Log in to reply