forked from NdoleStudio/httpsms-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.ts
More file actions
24 lines (20 loc) · 640 Bytes
/
index.ts
File metadata and controls
24 lines (20 loc) · 640 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import axios, {type AxiosInstance} from 'axios';
import MessageService from './src/message-service.js';
import CipherService from './src/cipher-service.js';
class HttpSms {
public messages: MessageService;
public cipher: CipherService;
private readonly client: AxiosInstance;
constructor(apiKey: string, baseUrl = 'https://api.httpsms.com') {
this.client = axios.create({
// eslint-disable-next-line @typescript-eslint/naming-convention
baseURL: baseUrl,
headers: {
'x-api-key': apiKey,
},
});
this.messages = new MessageService(this.client);
this.cipher = new CipherService();
}
}
export default HttpSms;