- Replaced the `getCurrentRates` method with `runAllFetchs` to dispatch fetching jobs for currency and gold rates synchronously.
- Added `getAllRates`, `getGoldRates`, and `getGoldRateByName` methods to improve data retrieval from respective JSON files.
- Updated error messages for clarity and consistency.
- Streamlined JSON file handling by using variables for file paths, enhancing maintainability.
These changes improve the CurrencyController's functionality and organization, facilitating better management of financial data.
- Added an 'Update_Date' field to store the current timestamp when fetching gold rates.
- Refactored gold name formatting to ensure consistency by converting names to uppercase and replacing specific substrings with standardized abbreviations.
- Improved maintainability by using a full name variable for gold types before abbreviation.
These changes enhance the data structure and clarity of the gold rates fetched by the application.
- Introduced a new helper class `NumberFormatter` with a method `commaToDot` to convert numbers formatted with commas to a dot notation.
- The method also trims whitespace and removes percentage signs for cleaner data handling.
This commit enhances the application's ability to process numerical data consistently, supporting future financial data operations.
- Introduced a new console command `RunAllFetchs` to streamline the execution of `FetchCurrencyRates`, `FetchGoldRates`, and `MergeCurrencyAndGoldRates` jobs.
- Implemented synchronous dispatching of jobs with timing results displayed in a table format for performance monitoring.
- This command enhances the application's ability to fetch and merge financial data efficiently in a single execution step.
- Changed the scheduling frequency of the FetchCurrencyRates job from hourly to every minute.
- Added FetchGoldRates and MergeCurrencyAndGoldRates jobs to the schedule, ensuring they also run every minute.
- Introduced a new method `runScheduledCommands` to encapsulate the scheduling logic for better organization and maintainability.
This commit enhances the application's ability to fetch and merge financial data in a timely manner.
- Added the `FetchGoldRates` job to retrieve gold rates and the `MergeCurrencyAndGoldRates` job to combine currency and gold rates.
- Updated the `getCurrentRates` method to read from a new JSON file `merged/rates.json` instead of the previous `currency/today.json`.
- Commented out the synchronous dispatch of the fetching jobs for future implementation.
This commit enhances the CurrencyController's functionality by preparing it for integrated financial data management.
- Introduced a new job class `MergeCurrencyAndGoldRates` to handle the merging of currency and gold rate data.
- Implemented a method to retrieve data from JSON files stored in the application.
- Merged the fetched currency and gold data into a single array.
- Stored the combined data in a new JSON file for easy access and further processing.
This commit enhances the application's ability to manage and utilize financial data by integrating currency and gold rates into a unified format.
- Introduced a new job class `FetchGoldRates` to handle the fetching of gold rates from an external source.
- Implemented data extraction using DOM parsing to retrieve relevant gold rate information.
- Utilized `NumberFormatter` for consistent number formatting of the fetched values.
- Stored the processed gold rates in a JSON file for easy access and further processing.
- Enhanced the maintainability of the code by organizing the fetching logic and data handling.
This commit establishes a foundation for integrating gold rate data into the application.
- Introduced a new helper method `fetchData` to streamline HTTP requests for currency data.
- Replaced direct HTTP calls with the new `fetchData` method for better code organization.
- Utilized `NumberFormatter` for consistent number formatting, replacing the previous `virgulToNokta` method.
- Enhanced data handling for currency rates, ensuring proper type casting and rounding for values.
- Removed commented-out code related to gold rates to clean up the implementation.
These changes enhance the maintainability and readability of the currency fetching logic.
- Updated the introduction in `intro.md` to provide a clearer overview of the application and its features.
- Added new API endpoints in `00.yaml` for retrieving today's currency rates and specific currency rates by name, enhancing the API's functionality.
- Removed outdated documentation files including `collection.json`, `index.html`, `openapi.yaml`, and associated CSS and JS files to streamline the project structure.
- Updated the `.filehashes` to reflect changes in the documentation files.
This commit improves the clarity and usability of the Truncgil Finance API documentation and expands its capabilities.
Implemented a new method `getCurrencyRateByName` in the CurrencyController to fetch the currency rate based on the provided currency name from a JSON file. The method handles cases where the file does not exist or the currency is not found, returning appropriate JSON responses for each scenario.