GithubHelp home page GithubHelp logo

sangkun-svg / bubble-fetcher Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 2.0 100 KB

BubbleFetcher simplifies communication with Bubble.io, speeding up development by wrapping the Bubble API and providing easy-to-use methods.

Home Page: https://www.npmjs.com/package/bubblefetcher

TypeScript 32.48% JavaScript 67.52%
typescript bubble fetcher

bubble-fetcher's Introduction

BubbleFetcher · MIT License PRs Welcome

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.



Installation

Install bubbleFetcher with NPM or Yarn

  npm i bubblefetcher
  
  or

  yarn add bubblefetcher


How to Use ?

  1. Import bubbleFetcher
import { bubbleFetcher } from "bubblefetcher";
  1. Configure variables
bubbleFetcher.init({
  apiKey : "your-bubble-api-key",
  domain : "your-bubble-domain",
  isDev : true || false
})

Example

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"
})
  1. Request
  • bubbleFetcher.get(objectName[, sortOption[, constrains]])

        // 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])

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

      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)

      await bubbleFetcher.delete("/user/${UID}")


Used By

This project is used by the following companies:



Contributing

Contributions are always welcome!



Reference

bubble-fetcher's People

Contributors

mo-zza avatar sangkun-svg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.