NativeScript - Which API to use?

I’m very new to Photon and Particle.io, but have played with Arduinos. I know mobile app and web dev very well.

I understand that from within an app on iOS or Android, I could call the REST API to interact with a Photon, but I’m curious if I could also use the Javascript API within my NativeScript code. This is really just my curiosity - I don’t have a need to do this (yet) - but I suspect that the coding would be simpler for use the Javascript API rather than the REST API.

Does the Javascript API use any DOM components? (I’m pretty sure it would not). That is really the only constraint on the use of a library in NativeScript - No DOM access.

Thanks

Not sure if this helps -https://github.com/spark/particle-api-js