Metered Licensing
Metered licensing is a new licensing mechanism that can be used alongside existing licensing methods. If you want to be billed based on your usage of Aspose.Slides API features, you choose metered licensing.
When you purchase a metered license, you get keys (and not a license file). This metered key can be applied using the Metered class Aspose provided for metering operations. For more details, see Metered Licensing FAQ.
-
Create an instance of the Metered class.
-
Pass your public and private keys to the setMeteredKey method.
-
Do some processing (perform tasks).
-
Call the getConsumptionQuantity method of the
Metered
class.
You should see the amount/quantity of API requests you have consumed so far.
This sample code shows you how to use metered licensing:
var aspose = aspose || {};
aspose.slides = require("aspose.slides.via.java");
// Creates an instance of the Metered class
var metered = new aspose.slides.Metered();
// Passes the public and private keys to the Metered object
metered.setMeteredKey("<valid public key>", "<valid private key>");
// Gets the consumed quantity value before API calls
var amountBefore = aspose.slides.Metered.getConsumptionQuantity();
console.log("Amount consumed before:", amountBefore);
// Do something with Aspose.Slides API here
// ...
// Gets the consumed quantity value after API calls
var amountAfter = aspose.slides.Metered.getConsumptionQuantity();
console.log("Amount consumed after:", amountAfter);