MCPcopy Create free account
hub / github.com/pollinations/pollinations / exampleUsage

Function exampleUsage

apps/micro/examples/integration-example.js:113–141  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

111
112// Example usage in a service
113async function exampleUsage() {
114 const authEmailService = new AuthEmailService();
115 const imageNotificationService = new ImageNotificationService();
116 const enterNotificationService = new EnterNotificationService();
117
118 // Send welcome email to new user
119 await authEmailService.sendUserWelcomeEmail("user@example.com", "John Doe");
120
121 // Send password reset email
122 await authEmailService.sendPasswordResetEmail(
123 "user@example.com",
124 "John Doe",
125 "abc123token",
126 );
127
128 // Send image generation notification
129 await imageNotificationService.sendImageGenerationCompleteEmail(
130 "user@example.com",
131 "John Doe",
132 "https://pollinations.ai/image/abc123",
133 );
134
135 // Send account upgrade notification
136 await enterNotificationService.sendAccountUpgradeEmail(
137 "user@example.com",
138 "John Doe",
139 "Pro",
140 );
141}
142
143export { AuthEmailService, ImageNotificationService, EnterNotificationService };

Callers

nothing calls this directly

Tested by

no test coverage detected