Aspose.PSD מאפשר למפתחים להחיל מפתח מומטר. זוהי מנגנון רישוי חדש. המנגנון החדש יושם ביחד עם שיטת הרישוי הקיימת. ללקוחות שרוצים לשלם על סמך שימוש בתכונות ה- API יכולים להשתמש ברישיון כמותי. לפרטים נוספים, אנא הסתכל על רשימת שאלות נפוצות על רישיון כמותי .
רישיון כמותי
כאן תמצא את השלבים הפשוטים לשימוש במחלקת ה- Metered.
- צור מופע של המחלקה Metered.
- בצע את פעולת setMeteredKey עם מפתחות ציבוריים ופרטיים.
- בצע עיבוד (בצע משימה).
- קרא לשיטה getConsumptionQuantity מתוך המחלקה Metered.
- זה יחזיר את הכמות/כמות הבקשות של API שכבר צרפת.
הנה הקוד הדוגמא המדגים איך להגדיר מפתח ציבורי ופרטי במטרות מומטר.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create an instance of PSD Metered class | |
Metered metered = new Metered(); | |
// Access the setMeteredKey property and pass public and private keys as parameters | |
metered.setMeteredKey("*****", "*****"); | |
// Get metered data amount before calling API | |
System.out.println("Amount Consumed Before: " + Metered.getConsumptionQuantity()); | |
// Get metered data amount After calling API | |
System.out.println("Amount Consumed After: " + Metered.getConsumptionQuantity()); | |