Learn how to use Google Gemini effectively with Tomba API documentation for code generation and development assistance.
Quick Use
Direct Documentation Reference
Reference our documentation in your Gemini prompts:
Code
Please analyze the Tomba API documentation at https://docs.tomba.io/llms.txt and help me create a Java Spring Boot application that integrates email verification into user registration with proper error handling and rate limiting.
Code Generation with Context
Code
Using the Tomba API documentation available at https://docs.tomba.io/llms.txt, generate a complete Flutter/Dart package for email verification that includes:- HTTP client configuration- Model classes for API responses- Error handling- Rate limiting- Unit tests- Usage examples
Gemini-Specific Features
1. Multi-Modal Capabilities
Upload screenshots or diagrams along with your code requests:
Code
I've uploaded a diagram of my application architecture. Based on this architecture and the Tomba API documentation (https://docs.tomba.io/llms.txt), help me integrate email verification into the user registration flow. Show me how to implement this in the service layer.
2. Code Analysis and Optimization
Code
Here's my current email validation implementation:[Paste code]Based on the Tomba API documentation at https://docs.tomba.io/llms.txt, analyze this code and provide optimizations for:- Performance improvements- Better error handling- Rate limiting integration- Security enhancements- Code maintainability
3. Long-Form Technical Documentation
Code
Based on the Tomba API documentation (https://docs.tomba.io/llms.txt), create comprehensive technical documentation for integrating email verification into a Node.js application, including:1. Architecture overview2. Implementation guide3. Configuration options4. Error handling strategies5. Performance considerations6. Security best practices7. Testing approaches8. Deployment guidelines9. Monitoring and logging10. Troubleshooting guideMake it detailed enough for a development team to follow.
Development Workflows
1. API Client Development
Planning Phase:
Code
I need to create a robust API client for Tomba email verification. The API documentation is available at https://docs.tomba.io/llms.txt.Please analyze the API and provide:1. Recommended architecture for the client2. Key design patterns to implement3. Error handling strategy4. Rate limiting approach5. Caching considerations6. Testing strategy7. Documentation requirementsFocus on scalability and maintainability for an enterprise application.
Implementation Phase:
Code
Based on our previous discussion and the Tomba API documentation, implement a production-ready TypeScript client with:Core Features:- Authentication management- Request/response interceptors- Automatic retry with exponential backoff- Rate limiting with queue management- Response caching with TTL- Comprehensive error handling- Event-driven architecture for monitoring- TypeScript interfaces for all endpoints- Configurable timeouts and retries- Health check capabilitiesPlease provide the complete implementation with detailed comments.
2. Framework-Specific Integration
Django Integration:
Code
Using the Tomba API (documentation: https://docs.tomba.io/llms.txt), create a Django integration package that includes:1. Django settings configuration2. Custom user model with email verification3. Middleware for request validation4. Management commands for bulk operations5. Admin interface integration6. Celery tasks for background processing7. Custom form fields with validation8. REST API views using Django REST Framework9. Unit and integration tests10. Documentation with examplesStructure this as a reusable Django package.
Angular Integration:
Code
Based on the Tomba API docs (https://docs.tomba.io/llms.txt), create an Angular service and components for email verification:1. Injectable service with HTTP client2. Reactive forms integration3. Custom validators for real-time verification4. Error handling with user-friendly messages5. Loading states and progress indicators6. Caching with Angular HTTP interceptors7. TypeScript models and interfaces8. Unit tests with Jasmine/Karma9. E2E tests with Protractor/Cypress10. Component library with StorybookInclude proper dependency injection and RxJS patterns.
3. Performance and Scalability
High-Performance Implementation:
Code
Design a high-performance email verification system using Tomba API (docs: https://docs.tomba.io/llms.txt) for an application processing 1M+ emails daily:Requirements:- Sub-100ms response times- 99.99% uptime- Horizontal scaling- Fault tolerance- Cost optimizationDesign considerations:1. Connection pooling strategies2. Request batching and queuing3. Multi-level caching (Redis, CDN, application)4. Circuit breaker pattern5. Health checks and monitoring6. Graceful degradation7. Rate limiting strategies8. Database optimization9. Microservices architecture10. Auto-scaling policiesProvide implementation details for each component.
Code Generation Examples
1. Go Microservice
Prompt:
Code
Using the Tomba API documentation (https://docs.tomba.io/llms.txt), create a complete Go microservice for email verification with:Architecture:- Clean architecture pattern- Dependency injection- Interface-based design- Repository patternFeatures:- HTTP API with Gin framework- gRPC service definitions- Rate limiting with Redis- Caching with multiple backends- Structured logging with logrus- Metrics with Prometheus- Health checks- Graceful shutdown- Configuration management- Database integration (PostgreSQL)Testing:- Unit tests with testify- Integration tests- Mock implementations- Performance benchmarksDevOps:- Dockerfile- Docker Compose- Kubernetes manifests- CI/CD pipeline (GitHub Actions)Provide the complete implementation with proper project structure.
2. Python FastAPI Service
Prompt:
Code
Based on the Tomba API documentation at https://docs.tomba.io/llms.txt, create a production-ready FastAPI service with:Core Features:- Async/await throughout- Pydantic models for validation- SQLAlchemy for database operations- Redis for caching and rate limiting- Celery for background tasks- Authentication with JWT- API documentation with OpenAPI- Error handling and logging- Health checks and metricsAdvanced Features:- Dependency injection- Middleware for rate limiting- Background task processing- WebSocket support for real-time updates- File upload for bulk operations- Export functionality (CSV, JSON)- Admin interface- Monitoring dashboardProduction Ready:- Docker containerization- Configuration management- Testing suite (pytest)- CI/CD pipeline- Monitoring and alerting- Security best practicesInclude complete project structure and deployment guides.
3. React TypeScript Application
Prompt:
Code
Using the Tomba API (docs: https://docs.tomba.io/llms.txt), create a complete React TypeScript application for email management with:Application Features:- Email verification dashboard- Bulk email processing- Real-time validation- Export/import functionality- User management- Analytics and reportingTechnical Implementation:- React 18 with hooks- TypeScript throughout- Tailwind CSS for styling- React Query for data fetching- React Hook Form for forms- React Router for navigation- Context API for state management- WebSocket for real-time updatesDevelopment Tools:- Vite for build tooling- ESLint and Prettier- Husky for git hooks- Jest and React Testing Library- Storybook for component development- Chromatic for visual testingProduction Features:- Error boundaries- Performance optimization- Accessibility compliance- SEO optimization- PWA capabilities- Monitoring integrationInclude complete project setup and development workflow.
Advanced Gemini Features
1. Code Explanation and Documentation
Code
Analyze this Tomba API integration code and provide:1. Line-by-line explanation of complex parts2. Architectural decisions and their rationale3. Performance implications4. Security considerations5. Potential improvements6. Alternative implementation approaches7. Testing strategies8. Deployment considerations[Paste your code here]Make the explanation detailed enough for a junior developer to understand and maintain.
2. Comparative Analysis
Code
Based on the Tomba API documentation (https://docs.tomba.io/llms.txt), compare different implementation approaches for email verification:1. Client-side vs Server-side validation2. Synchronous vs Asynchronous processing3. Different programming languages (Node.js, Python, Go, Java)4. Framework choices (Express, FastAPI, Gin, Spring Boot)5. Database options (PostgreSQL, MongoDB, Redis)6. Caching strategies (In-memory, Redis, CDN)7. Deployment options (Docker, Kubernetes, Serverless)Provide pros/cons, use cases, and implementation examples for each approach.
3. Troubleshooting and Debugging
Code
I'm experiencing issues with my Tomba API integration:Symptoms:- Intermittent timeouts (15% of requests)- High memory usage- Occasional 429 rate limit errors- Slow response times during peak hoursCurrent setup:- Node.js with Express- Single instance deployment- No caching- Basic error handlingBased on the Tomba API documentation and best practices, diagnose the issues and provide:1. Root cause analysis2. Step-by-step debugging approach3. Monitoring and logging improvements4. Performance optimizations5. Infrastructure recommendations6. Code improvements7. Testing strategies for validationInclude specific code examples and configuration changes.
Best Practices for Gemini
1. Detailed Context Provision
Code
Project Context:- Technology Stack: React, Node.js, PostgreSQL, Redis- Scale: 100k users, 500k emails/day- Team: 5 developers, 2 DevOps engineers- Timeline: 8 weeks for MVP- Budget: $50k for infrastructure- Compliance: GDPR, SOXTechnical Requirements:- 99.9% uptime SLA- <200ms API response time- Real-time email validation- Bulk processing capabilities- Audit logging- Multi-tenant architectureBased on the Tomba API documentation (https://docs.tomba.io/llms.txt), design and implement an email verification system that meets these requirements.
2. Iterative Development
Code
Let's build this email verification system iteratively:Phase 1: Core API integration and basic validationPhase 2: Error handling and rate limitingPhase 3: Caching and performance optimizationPhase 4: Monitoring and alertingPhase 5: Security hardening and complianceStart with Phase 1. Based on the Tomba API docs, implement the core email verification functionality with proper TypeScript types and basic error handling.
3. Comprehensive Testing Strategy
Code
For the Tomba API integration we're building, create a comprehensive testing strategy that includes:Unit Testing:- Individual function testing- Mock API responses- Error scenario validation- Edge case handlingIntegration Testing:- End-to-end API flows- Database integration- Cache integration- Third-party service mockingPerformance Testing:- Load testing with varying request volumes- Stress testing for rate limits- Memory usage profiling- Response time benchmarkingSecurity Testing:- Authentication validation- Input sanitization- API key protection- Rate limiting effectivenessProvide test implementation examples for each category using appropriate testing frameworks.
Integration Patterns
1. Event-Driven Architecture
Code
Design an event-driven architecture for email verification using Tomba API (docs: https://docs.tomba.io/llms.txt) with:Events:- EmailVerificationRequested- EmailVerificationCompleted- EmailVerificationFailed- BulkVerificationStarted- BulkVerificationCompletedComponents:- Event producers (API endpoints)- Event consumers (verification services)- Event store (database)- Message broker (Redis/RabbitMQ)- Notification serviceImplementation:- Event schemas- Publisher/subscriber patterns- Error handling and retry logic- Dead letter queues- Event sourcing patterns- CQRS implementationProvide complete implementation with Node.js and TypeScript.
2. CQRS and Event Sourcing
Code
Implement CQRS and Event Sourcing patterns for email verification using Tomba API:Commands:- VerifyEmailCommand- BulkVerifyEmailsCommand- UpdateVerificationStatusCommandQueries:- GetEmailVerificationQuery- GetBulkVerificationStatusQuery- GetVerificationHistoryQueryEvents:- EmailVerificationStartedEvent- EmailVerificationCompletedEvent- VerificationStatusUpdatedEventInclude aggregate roots, event handlers, and projection builders.
Troubleshooting
Common Issues with Gemini
Context Length: Break long requests into smaller, focused queries
Code Formatting: Request specific output formats (markdown, code blocks)
Technical Depth: Be explicit about the level of detail needed
Implementation Scope: Clearly define what you want implemented vs planned
Optimization Tips
Use Specific Examples: Provide concrete scenarios and requirements
Request Alternatives: Ask for multiple implementation approaches
Include Constraints: Mention performance, security, and scalability requirements
Ask for Explanations: Request rationale behind implementation decisions