I often get to the question when using a service, should I find a SDK for my language (Node.js) or should I just send raw HTTP requests.
Some services provide you with a really up-to-date SDK with good documentation: https://www.braintreepayments.com/developers
Others are doing a mediocre job while the rest is only providing a Restful HTTP API.
From my perspective:
Pros with SDK:
- You love your language and want to write/read it.
Cons with SDK:
- Not all services provide one (too expensive/impossible to have SDKs for all languages)
- Not up-to-date.
- Don’t cover all the features of the underlying HTTP API.
- Split community.
- Thin documentation.
It seems that the cons outweigh the pros with using a language SDK.
Should I always use the raw HTTP API directly if there is one?
I’d say ‘it depends’ (that’s why I consider this question not very suitable for SO format, btw), and for me the most important factor is how stable both HTTP API and SDK are.
If API is stable, it’s probably covered by SDK well enough to safely use the latter.
If API is developing rapidly, it’s most probably (there are few exceptions) not covered well enough by SDK.
Or course, it’s all said assuming that the features you require are covered by both API and SDK. If that’s not the case, I’d suggest using only the basic functions of SDK (authorization module, for example), and implement all the complex ones by yourself.