-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
ModuleConfig.cfc
37 lines (33 loc) · 1.07 KB
/
ModuleConfig.cfc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
component {
this.title = "SendGrid Web API v3";
this.author = "Matthew J. Clemente";
this.webURL = "https://github.com/mjclemente/sendgrid.cfc";
this.description = "A wrapper for the SendGrid Web API v3";
function configure(){
settings = {
apiKey = '', // Required
emailValidationApiKey = '', // Optional
baseUrl = 'https://api.sendgrid.com/v3', // Default value in init
forceTestMode = false, // Default value in init
httpTimeout = 60, // Default value in init
includeRaw = false // Default value in init
};
}
function onLoad(){
binder.map( "sendgrid@sendgridcfc" )
.to( "#moduleMapping#.sendgrid" )
.asSingleton()
.initWith(
apiKey = settings.apiKey,
emailValidationApiKey = settings.emailValidationApiKey,
baseUrl = settings.baseUrl,
forceTestMode = settings.forceTestMode,
httpTimeout = settings.httpTimeout,
includeRaw = settings.includeRaw
);
binder.mapDirectory(
packagePath = "#REreplace( moduleMapping, '^/', '' )#/helpers",
namespace = "@sendgridcfc"
);
}
}