RocketChat / Rocket.Chat.js.SDK

Utility for apps and bots to interact with Rocket.Chat via DDP and/or API
MIT License
135 stars 95 forks source link

feat: allow user to pass apiVersion #166

Closed yash-rajpal closed 3 days ago

yash-rajpal commented 4 days ago

Currently the SDK defaults to using v1 version of API, and it directly adds the prefix v1 to all endpoints.

But some endpoints don't use v1 prefix, due to which we can't use those endpoints with current implementation, for example - api/apps/actionbuttons, here the api version is apps

This PR allows passing the api version of your choice, and defaults to v1 api version, which shouldn't break existing things.

RCAI-27