2026-05-07 16:15:15 -05:00 | | | //+------------------------------------------------------------------+
|
| | | //| Jobs.mqh |
|
| | | //| Copyright 2025, Niquel Mendoza. |
|
| | | //| https://www.mql5.com/es/users/nique_372 |
|
| | | //+------------------------------------------------------------------+
|
| | | #property copyright "Copyright 2025, Niquel Mendoza."
|
| | | #property link "https://www.mql5.com/es/users/nique_372"
|
| | | #property strict
|
| | |
|
| | | #ifndef TBPWRRAPER_SRC_MQL5_JOBS_MQH
|
| | | #define TBPWRRAPER_SRC_MQL5_JOBS_MQH
|
| | |
|
| | | //+------------------------------------------------------------------+
|
| | | //| |
|
| | | //+------------------------------------------------------------------+
|
| | | #include "Base.mqh"
|
| | |
|
| | | //+------------------------------------------------------------------+
|
| | | //| |
|
| | | //+------------------------------------------------------------------+
|
2026-06-03 12:24:19 -05:00 | | | namespace TSN
|
| | | {
|
2026-10-13 07:37:43 -05:00 | | | //+------------------------------------------------------------------+
|
| | | //| |
|
| | | //+------------------------------------------------------------------+
|
2026-05-07 16:15:15 -05:00 | | | class CTbpJobs : public CTbpBase
|
| | | {
|
| | | public:
|
| | | CTbpJobs(void) {}
|
| | | ~CTbpJobs(void) {}
|
| | |
|
| | | //---
|
| | | // Verifica si el software relacionado con un trabajo puede usarse.
|
| | | // Resultado en GetLastJson()
|
| | | bool GetJobSoftwareAccess(const string& user_id, const string& job_id);
|
| | |
|
| | | //---
|
| | | // Verifica si un usuario puede acceder a la entrega de un trabajo.
|
| | | // Resultado en GetLastJson()
|
| | | bool CheckJobDeliveryAccess(const string& user_id, const string& job_id);
|
| | | };
|
| | |
|
| | | //+------------------------------------------------------------------+
|
| | | //| |
|
| | | //+------------------------------------------------------------------+
|
| | | bool CTbpJobs::GetJobSoftwareAccess(const string& user_id, const string& job_id)
|
| | | {
|
| | | //---
|
2026-10-13 07:37:43 -05:00 | | | const string url = StringFormat("%s?userId=%s&jobId=%s",
|
| | | THE_BOT_PLACE_API_JOBS, user_id, job_id);
|
| | | return SendAndParse(url);
|
2026-05-07 16:15:15 -05:00 | | | }
|
| | |
|
| | | //+------------------------------------------------------------------+
|
| | | //| |
|
| | | //+------------------------------------------------------------------+
|
| | | bool CTbpJobs::CheckJobDeliveryAccess(const string& user_id, const string& job_id)
|
| | | {
|
| | | //---
|
2026-10-13 07:37:43 -05:00 | | | const string url = StringFormat("%s%s?userId=%s",
|
| | | THE_BOT_PLACE_API_JOBS, job_id, user_id);
|
| | | return SendAndParse(url);
|
2026-05-07 16:15:15 -05:00 | | | }
|
2026-06-03 12:24:19 -05:00 | | | }
|
2026-05-07 16:15:15 -05:00 | | | //+------------------------------------------------------------------+
|
| | | #endif // TBPWRRAPER_SRC_MQL5_JOBS_MQH
|