Eskiz Plugin is a Java-based tool designed to integrate with the Eskiz SMS API. This plugin enables developers to send SMS, manage templates, track SMS statuses, and generate reports with ease. It serves as an efficient bridge for automating SMS communications in any Java application.
- Send SMS: Seamlessly send SMS messages to users.
- Template Management: Create and manage SMS templates for consistent messaging.
- Report Generation: Fetch detailed reports for sent SMS by date or month.
- Status Tracking: Monitor the delivery status of sent SMS messages.
- User Data Management: Retrieve user-related data for better insights.
-
Configuration:
WebClientConfig.java
: Configures the WebClient for API interactions.EskizProperties.java
: Holds customizable properties related to Eskiz API.
-
DTO (Data Transfer Objects):
MessageDto.java
,TokenHolderDTO.java
: Transfer data between layers.- Request and Response DTOs, e.g.,
SendSmsResponseDTO
,TemplateRequestDTO
.
-
Services:
SendSmsService
,ReportService
: Core services for sending SMS and generating reports.- Implementations:
SendSmsServiceImpl
,ReportServiceImpl
.
-
Utility:
HelperUtil.java
: Contains helper methods to simplify common tasks.
-
Storage:
TokenStorage.java
: Securely manages API tokens for authorization.
-
Enums:
Constants.java
: Defines reusable constants for the application.
Ensure the following tools and environments are available:
- Java (version 11 or higher)
- Maven (for dependency management)
- Access to Eskiz API credentials:
Email
Password
Sender Name
Callback URL
-
Clone the repository:
git clone https://github.com/yourusername/eskiz-plugin.git cd eskiz-plugin
-
Configure the application:
Update the
application.yml
file with your Eskiz API credentials:eskiz: simulate: false # Set to true for testing without actually sending SMS email: 'your-email' # Your registered email on Eskiz password: 'your-password' # Your Eskiz account password sender-name: 'your-sender-name' # The sender name or ID used in SMS callback-url: 'your-callback-url' # Optional callback URL for delivery reports
-
Build the project using Maven:
mvn clean install
-
Include the plugin in your Java application by importing the appropriate classes.
Use SendSmsService
to send SMS messages. Example:
@Autowired
private SendSmsService sendSmsService;
public void sendMessage() {
SendSmsResponseDTO response = sendSmsService.sendSms("998901234567", "Hello, this is a test message.");
System.out.println("Message sent: " + response.getMessage());
}
Use ReportService
to fetch SMS reports. Example:
@Autowired
private ReportService reportService;
public void getMonthlyReport() {
ReportByMonthResponseDTO report = reportService.getReportByMonth("2024-11");
System.out.println("Total Messages Sent: " + report.getTotalMessages());
}
Use TemplateService
to manage SMS templates. Example:
@Autowired
private TemplateService templateService;
public void createTemplate() {
TemplateResponseDTO template = templateService.createTemplate("Greetings", "Hello, welcome to our service!");
System.out.println("Template ID: " + template.getId());
}
We welcome contributions! Please follow these steps:
- Fork the repository.
- Create a new branch (
feature/my-feature
). - Commit your changes.
- Push to the branch.
- Open a Pull Request.
This project is licensed under the MIT License. See the LICENSE
file for details.
For any issues or inquiries, please contact:
- Developer Name: Javohir Yallayev
- Email: javoxiryallayev1@gmail.com
- GitHub: javohirdeveloper0612