GithubHelp home page GithubHelp logo

Comments (4)

monkbroc avatar monkbroc commented on May 29, 2024

I think your best bet is to look at the cloud API documentation https://docs.particle.io/reference/api/ and write code to access those HTTP endpoints through your proxy. It sounds like wrapping the particle-api-js module in a proxy module would be harder than wiring a couple HTTP calls from scratch.

from particle-api-js.

thenano avatar thenano commented on May 29, 2024

Basically I have stopped using this library and am doing the HTTP calls myself. That being said, this library provides a nice DSL, and some good practices around error handling and handling streams, which I would have to re-implement, and which I would love to avoid. Also, I imagine this library will continue to evolve as the api evolves, and so having the ability to just update this and be compatible with latest api would be great.
If there's interest, I can try and work on a pull-request.

from particle-api-js.

monkbroc avatar monkbroc commented on May 29, 2024

Sure, if you'd like to investigate how to support proxies, go ahead. I'd love to see a pull request that adds the ability to inject additional superagent plugins, and puts information in the readme on how to add a proxy plugin.

from particle-api-js.

brycekahle avatar brycekahle commented on May 29, 2024

I would recommend avoiding request. We specifically switched away from it because it is too heavy for a library that needs to run in the browser.

from particle-api-js.

Related Issues (20)

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.