spaps
Version:
Sweet Potato Authentication & Payment Service CLI - Docker Compose orchestrator for local Python/FastAPI SPAPS server with built-in admin middleware
38 lines (34 loc) • 1.14 kB
JavaScript
const chalk = require('chalk');
function showQuickReference() {
const output = [
'',
chalk.yellow('🍠 SPAPS SDK Quick Reference'),
'',
chalk.green('Installation:'),
' npm install spaps-sdk',
'',
chalk.green('Basic Setup:'),
chalk.gray(` import { SPAPSClient } from 'spaps-sdk'`),
chalk.gray(` const spaps = new SPAPSClient()`),
'',
chalk.green('Common Methods:'),
' await spaps.login(email, password)',
' await spaps.register(email, password)',
' await spaps.getUser()',
' await spaps.createCheckoutSession(priceId, successUrl)',
' await spaps.getSubscription(subscriptionId)',
' await spaps.getUsageBalance()',
'',
chalk.green('Helper Methods:'),
` spaps.isAuthenticated() ${chalk.gray('// Check auth status')}`,
` spaps.isLocalMode() ${chalk.gray('// Check if local mode')}`,
` spaps.getAccessToken() ${chalk.gray('// Get current token')}`,
'',
chalk.blue('📚 Full docs: npx spaps docs --interactive'),
'',
].join('\n');
process.stdout.write(`${output}\n`);
}
module.exports = {
showQuickReference,
};