Skip to content

Commit f76e09e

Browse files
committed
fixes
1 parent 659d52a commit f76e09e

File tree

3 files changed

+5
-14
lines changed

3 files changed

+5
-14
lines changed

greip/greip.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import requests
22

3-
available_country_params = ['EN', 'AR', 'DE', 'FR', 'ES', 'JA', 'ZH', 'RU']
43
available_geoip_params = ['location', 'security', 'timezone', 'currency', 'device']
4+
available_country_params = ['language', 'flag', 'currency', 'timezone']
55

66
class 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)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
55
[project]
66
requires-python = ">= 3.6"
77
name = "greip"
8-
version = "1.0.0"
8+
version = "1.0.1"
99
description = "Python wrapper for Greip API"
1010
readme = "README.md"
1111
license = { file = "LICENSE" }

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
setup(
1010
name="greip",
11-
version="1.0.0",
11+
version="1.0.1",
1212
description="Python wrapper for Greip API",
1313
long_description=long_description,
1414
long_description_content_type="text/markdown",
@@ -34,4 +34,4 @@
3434
"Bug Reports": "https://github.com/Greipio/python/issues",
3535
"Source": "https://github.com/Greipio/python",
3636
},
37-
)
37+
)

0 commit comments

Comments
 (0)