# bubblefetcher

> Use fetcher with bubble.io

Latest version **1.0.20** (published 2023-10-05) · ISC license · 0 weekly downloads

## Install

```sh
npm install bubblefetcher
pnpm add bubblefetcher
yarn add bubblefetcher
bun add bubblefetcher
```

## Health

**Score 35/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.20 |
| Published | 2023-10-05 |
| First published | 2023-08-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 21.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Maintainers | sangkun-svg |
| Keywords | http, fetch, fetcher, bubble, bubble.io, BubbleFetcher, promise, node |

## Links

- npm: https://www.npmjs.com/package/bubblefetcher
- Repository: https://github.com/Sangkun-svg/BubbleFetcher
- Homepage: https://github.com/Sangkun-svg/BubbleFetcher#readme
- Issues: https://github.com/Sangkun-svg/BubbleFetcher/issues
- npm.io page: https://npm.io/package/bubblefetcher

## Dependencies (1)

- [axios](https://npm.io/package/axios.md) ^1.4.0

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 1.0.20 (latest) — 2023-10-05
- 1.0.19 — 2023-09-22
- 1.0.18 — 2023-09-22
- 1.0.17 — 2023-09-21
- 1.0.16 — 2023-09-10
- 1.0.14 — 2023-09-07
- 1.0.13 — 2023-09-06
- 1.0.5 — 2023-08-25
- 1.0.4 — 2023-08-25
- 1.0.3 — 2023-08-25
- 1.0.2 — 2023-08-25
- 1.0.1 — 2023-08-25
- 0.2.2 — 2023-08-23
- 0.2.1 — 2023-08-23
- 0.0.2 — 2023-08-22
- … 1 more at https://npm.io/package/bubblefetcher/versions

## README

# BubbleFetcher &middot; [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/toss/slash/blob/main/LICENSE) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/toss/slash/blob/main/.github/CONTRIBUTING.md)


 BubbleFetcher is a library designed to simplify communication with Bubble.io, a no-code tool.

With BubbleFetcher, developers can easily integrate Bubble applications with their own stack and accelerate the development process. 

BubbleFetcher provides a wrapper over the Bubble API, providing easy-to-use methods for common tasks such as CRUD operations, authentication, and accessing data.


<br/>
<br/>


# Installation

Install bubbleFetcher with NPM or Yarn

```bash
  npm i bubblefetcher
  
  or

  yarn add bubblefetcher
```
     
<br/>
<br/>

# How to Use ?

1. Import bubbleFetcher
```js
import { bubbleFetcher } from "bubblefetcher";
```

2. Configure variables
```js
bubbleFetcher.init({
  apiKey : "your-bubble-api-key",
  domain : "your-bubble-domain",
  isDev : true || false
})

```
Example
```js
const BUBBLE_API_KEY = process.env.BUBBLE_API_KEY
bubbleFetcher.init({
  apiKey : BUBBLE_API_KEY,
  domain : "edu.todomall.kr",
  isDev : process.env.NODE_ENV === "development"
})

```

3. Request
    
  - #### bubbleFetcher.get(objectName[, sortOption[, constrains]])
    ```js
        // getAll
        const users = await bubbleFetcher.get("/user")

        // getAllWithSort
        const users = await bubbleFetcher.get("/user", {
          sortOption: {
            sort_field: "name_text",
            descending: true || false,
          },
        });

        // getAllWithConstarint
        const users = await bubbleFetcher.get("/user", {
          constraints: {
            key: "name_text",
            constraint_type: "equals",
            value: "target value",
          },
        });
    
        // getAllWithPage
        const users = await bubbleFetcher.get("/user", {
            pageOption: {
              cursor: 0,
              limit: 10,
            },   
        })


        // get with Sort and Constarint and Page
        const users = await bubbleFetcher.get("/user", {
         sortOption: {
           sort_field: "name_text",
           descending: true || false, 
         },
         constraints: {
           key: "name_text",
           constraint_type: "equals",
           value: "target value",
         },
         pageOption: {
           cursor: 0,
           limit: 10,
         },
       });
    ```

  - #### bubbleFetcher.post(objectName[, body])
    ```js
      await bubbleFetcher.post("/user" , {
        body :{
          name_text : "Sangkun-svg",
          age_number: 23
        }
      });

    ```

  - #### bubbleFetcher.put(objectName[, body]) && bubbleFetcher.patch(objectName[, body])
    ```js
      await bubbleFetcher.put("/user" , {
        body :{
          name_text : "Sangkun-svg",
          age_number: 23
        }
      });

      await bubbleFetcher.patch("/user" , {
        body :{
          name_text : "Sangkun-svg",
          age_number: 23
        }
      });
    ```

  - #### bubbleFetcher.delete(objectName)
    ```js
      await bubbleFetcher.delete("/user/${UID}")
    ```


<br/>
<br/>

# Used By
This project is used by the following companies:

 - [TodoMall](https://awesomeopensource.com/project/elangosundar/awesome-README-templates)
 - [GrowingPeople](https://www.growingpeople.site/)



<br/>
<br/>

# Contributing

Contributions are always welcome!

<br/>
<br/>


# Reference
- https://bugfender.com/blog/how-to-create-a-javascript-library/
- https://www.tsmean.com/articles/how-to-write-a-typescript-library/

---
_Source: https://npm.io/package/bubblefetcher · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
