@@ -209,6 +209,18 @@ class ApiProvider {
209209 return response;
210210 }
211211
212+ /// Send Register OTP
213+ Future <ResponseData > sendRegisterOtp (Map <String , dynamic > body) async {
214+ final response = await _catchAsyncApiError (
215+ endPoint: AppUrls .sendregisterOtpEndpoint,
216+ method: 'POST' ,
217+ feature: 'Send Register OTP' ,
218+ body: body,
219+ );
220+
221+ return response;
222+ }
223+
212224 /// Register
213225 Future <ResponseData > register (Map <String , dynamic > body) async {
214226 final response = await _catchAsyncApiError (
@@ -245,24 +257,24 @@ class ApiProvider {
245257 return response;
246258 }
247259
248- /// Send OTP To Email
249- Future <ResponseData > sendOtpToEmail (Map <String , dynamic > body) async {
260+ /// Validate User
261+ Future <ResponseData > validateUser (Map <String , dynamic > body) async {
250262 final response = await _catchAsyncApiError (
251- endPoint: AppUrls .sendOtpToEmailEndpoint ,
263+ endPoint: AppUrls .validateUserEndpoint ,
252264 method: 'POST' ,
253- feature: 'Send OTP To Email ' ,
265+ feature: 'Validate User ' ,
254266 body: body,
255267 );
256268
257269 return response;
258270 }
259271
260- /// Send Verify Email OTP
261- Future <ResponseData > sendVerifyEmailOtp (Map <String , dynamic > body) async {
272+ /// Send OTP To Email
273+ Future <ResponseData > sendOtpToEmail (Map <String , dynamic > body) async {
262274 final response = await _catchAsyncApiError (
263- endPoint: AppUrls .sendVerifyEmailOtpEndpoint ,
275+ endPoint: AppUrls .sendOtpToEmailEndpoint ,
264276 method: 'POST' ,
265- feature: 'Send Verify Email OTP ' ,
277+ feature: 'Send OTP To Email ' ,
266278 body: body,
267279 );
268280
@@ -305,30 +317,6 @@ class ApiProvider {
305317 return response;
306318 }
307319
308- /// Send Verify Account OTP
309- Future <ResponseData > sendVerifyAccountOtp (Map <String , dynamic > body) async {
310- final response = await _catchAsyncApiError (
311- endPoint: AppUrls .verifyAccountEndpoint,
312- method: 'POST' ,
313- feature: 'Send Verify Account OTP' ,
314- body: body,
315- );
316-
317- return response;
318- }
319-
320- /// Verify Account
321- Future <ResponseData > verifyAccount (Map <String , dynamic > body) async {
322- final response = await _catchAsyncApiError (
323- endPoint: AppUrls .verifyAccountEndpoint,
324- method: 'PUT' ,
325- feature: 'Verify Account' ,
326- body: body,
327- );
328-
329- return response;
330- }
331-
332320 /// --------------------------------------------------------------------------
333321
334322 /// Login Info & Location ----------------------------------------------------
@@ -1581,6 +1569,58 @@ class ApiProvider {
15811569
15821570 /// --------------------------------------------------------------------------
15831571
1572+ /// Block --------------------------------------------------------------------
1573+
1574+ /// Block User
1575+ Future <ResponseData > blockUser (String token, String userId) async {
1576+ final response = await _catchAsyncApiError (
1577+ endPoint: AppUrls .blockUserEndpoint,
1578+ method: 'POST' ,
1579+ feature: 'Block User' ,
1580+ headers: {"authorization" : "Bearer $token " },
1581+ body: {'userId' : userId},
1582+ );
1583+
1584+ return response;
1585+ }
1586+
1587+ /// Unblock User
1588+ Future <ResponseData > unblockUser (String token, String userId) async {
1589+ final response = await _catchAsyncApiError (
1590+ endPoint: AppUrls .unblockUserEndpoint,
1591+ method: 'POST' ,
1592+ feature: 'Unblock User' ,
1593+ headers: {"authorization" : "Bearer $token " },
1594+ body: {'userId' : userId},
1595+ );
1596+
1597+ return response;
1598+ }
1599+
1600+ /// Get Blocked Users
1601+ Future <ResponseData > getBlockedUsers (String token,
1602+ {int ? page, int ? limit}) async {
1603+ var queryParameters = < String , dynamic > {};
1604+
1605+ if (page != null ) {
1606+ queryParameters['page' ] = page.toString ();
1607+ }
1608+
1609+ if (limit != null ) {
1610+ queryParameters['limit' ] = limit.toString ();
1611+ }
1612+
1613+ final response = await _catchAsyncApiError (
1614+ endPoint: AppUrls .getBlockedUsersEndpoint,
1615+ method: 'GET' ,
1616+ feature: 'Get Blocked Users' ,
1617+ headers: {"authorization" : "Bearer $token " },
1618+ queryParams: queryParameters,
1619+ );
1620+
1621+ return response;
1622+ }
1623+
15841624 /// App Update ---------------------------------------------------------------
15851625
15861626 /// Get Latest App Release Info
0 commit comments