@@ -14,6 +14,7 @@ import { _request } from "./httpFetch";
1414export class Deepgram {
1515 private _apiUrl : string ;
1616 private _apiKey : string ;
17+ private _requireSSL : boolean ;
1718
1819 transcription : Transcriber ;
1920 projects : Projects ;
@@ -24,22 +25,23 @@ export class Deepgram {
2425 billing : Billing ;
2526 scopes : Scopes ;
2627
27- constructor ( apiKey : string , apiUrl ?: string ) {
28+ constructor ( apiKey : string , apiUrl ?: string , requireSSL ?: boolean ) {
2829 this . _apiKey = apiKey ;
2930 this . _apiUrl = apiUrl || DefaultOptions . apiUrl ;
31+ this . _requireSSL = requireSSL || DefaultOptions . requireSSL ;
3032
3133 /**
3234 * Ensures that the provided options were provided
3335 */
3436 validateOptions ( this . _apiKey , this . _apiUrl ) ;
3537
36- this . transcription = new Transcriber ( this . _apiKey , this . _apiUrl ) ;
37- this . projects = new Projects ( this . _apiKey , this . _apiUrl , _request ) ;
38- this . keys = new Keys ( this . _apiKey , this . _apiUrl , _request ) ;
39- this . usage = new Usage ( this . _apiKey , this . _apiUrl , _request ) ;
40- this . members = new Members ( this . _apiKey , this . _apiUrl , _request ) ;
41- this . invitation = new Invitation ( this . _apiKey , this . _apiUrl , _request ) ;
42- this . billing = new Billing ( this . _apiKey , this . _apiUrl , _request ) ;
43- this . scopes = new Scopes ( this . _apiKey , this . _apiUrl , _request ) ;
38+ this . transcription = new Transcriber ( this . _apiKey , this . _apiUrl , this . _requireSSL ) ;
39+ this . projects = new Projects ( this . _apiKey , this . _apiUrl , this . _requireSSL , _request ) ;
40+ this . keys = new Keys ( this . _apiKey , this . _apiUrl , this . _requireSSL , _request ) ;
41+ this . usage = new Usage ( this . _apiKey , this . _apiUrl , this . _requireSSL , _request ) ;
42+ this . members = new Members ( this . _apiKey , this . _apiUrl , this . _requireSSL , _request ) ;
43+ this . invitation = new Invitation ( this . _apiKey , this . _apiUrl , this . _requireSSL , _request ) ;
44+ this . billing = new Billing ( this . _apiKey , this . _apiUrl , this . _requireSSL , _request ) ;
45+ this . scopes = new Scopes ( this . _apiKey , this . _apiUrl , this . _requireSSL , _request ) ;
4446 }
4547}
0 commit comments