11import requests
22
3- available_country_params = ['EN' , 'AR' , 'DE' , 'FR' , 'ES' , 'JA' , 'ZH' , 'RU' ]
43available_geoip_params = ['location' , 'security' , 'timezone' , 'currency' , 'device' ]
4+ available_country_params = ['language' , 'flag' , 'currency' , 'timezone' ]
55
66class CustomResponse :
77 def __init__ (self , ** kwargs ):
@@ -232,12 +232,11 @@ def country(self, country_code: str, params=None, lang="EN"):
232232
233233 return self ._make_http_request ("Country" , payload )
234234
235- def profanity (self , text : str , params = None , lang = "EN" ):
235+ def profanity (self , text : str ):
236236 """Check if a text contains profanity.
237237
238238 Parameters:
239239 text (str): The text to check.
240- params (list): The modules to include in the response.
241240 lang (str): The language of the response.
242241
243242 Returns:
@@ -252,16 +251,8 @@ def profanity(self, text: str, params=None, lang="EN"):
252251 if not text :
253252 raise ValueError ("You should pass the `text` parameter." )
254253
255- if not isinstance (params , list ):
256- params = []
257-
258- #? Validate lang
259- self ._validate_lang (lang )
260-
261254 payload = {
262255 "text" : text ,
263- "params" : "," .join (params ),
264- "lang" : lang .upper (),
265256 }
266257
267258 return self ._make_http_request ("badWords" , payload )
0 commit comments