camomile-project / camomile-client-javascript

Javascript client for Camomile REST API
http://camomile-project.github.io/
MIT License
1 stars 6 forks source link

Use a class instead of a global Camomile object #8

Closed rom1504 closed 8 years ago

rom1504 commented 8 years ago

I think it would be better and would be closer to the python API https://github.com/camomile-project/camomile-client-python/blob/master/camomile/client.py#L149

Something like var client = new Camomile('http://camomile.fr/api');

hbredin commented 8 years ago

Yes. Definitely. Feel free to contribute this change!

hbredin commented 8 years ago

Even better if multiple clients can be instantiated at once. This could allow two things:

rom1504 commented 8 years ago

Ok I'm doing that. I'm wondering if I can use ES6 ? It has better syntax for classes. There are 2 possibilities to use es6 :

hbredin commented 8 years ago

I don't mind getting rid of old browsers.

rom1504 commented 8 years ago

done by #9