gemini-api-node icon indicating copy to clipboard operation
gemini-api-node copied to clipboard

Difficult to get up and running

Open JustWantToAsk1 opened this issue 6 years ago • 3 comments

I appreciate the wrapper. I will give it a go once I can get it working.

FYI the 'import' isn't standardized yet so Babel is required for set up from what I can see.

Seeing as I am new to babel getting this api up and running is very difficult as the babel documentation and community are littered with old/unusable advice.

I just thought it was worth mentioning as I am assuming other people ran into the same problem and gave up.

JustWantToAsk1 avatar Jul 14 '17 08:07 JustWantToAsk1

Ok cool so you don't need babel. You can do something like this as a work around -

const GeminiAPI = require('gemini-api');

const restClient = new GeminiAPI.default({ key, secret, sandbox: true }); const websocketClient = new GeminiAPI.default.WebsocketClient({ key, secret, sandbox: true });

JustWantToAsk1 avatar Jul 14 '17 08:07 JustWantToAsk1

I had to use default to make it work

const GeminiAPI = require('gemini-api').default;
const restClient = new GeminiAPI({ key, secret, sandbox: false });

amejiarosario avatar Dec 19 '17 19:12 amejiarosario

Hey guys (and anyone else who stumbles onto this issue). I haven't worked on this package in a while, but I decided recently to refurbish it a bit. I'm currently working on this branch: https://github.com/mjesuele/gemini-api-node/tree/mj/modernize-with-typescript.

It shouldn't take too much longer, and then it will be nice and modern (for now, anyway...)

mjesuele avatar Aug 01 '20 16:08 mjesuele