Which one is best mehod to obtain stock status on extenal script?

  1. $inStock = $obj->get(’\Magento\CatalogInventory\Api\StockStateInterface’)->verifyStock($_product->getId(), $_product->getStore()->getWebsiteId());

2.Sql Query in cataloginventory_stock_status

Magento2 has MCom module to manage multi location inventory but currently dont have much more idea but want to use appropriate method to get stock status so my code support MCom module as well.

Also older magento2 version(2.0) have default website id 0 and new Magento2 version have website 1 in cataloginventory_stock_status so difficult to get data with this kind of situation .

Is there any method which will work in older,new,MCom module to collect stock data?