Skip to content

remove skill api #194

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -395,22 +395,6 @@ else:
)
```

#### Get Skill Enrichment

```python
result = client.skill(
skill="c++",
)
if result.ok:
print(result.text)
else:
print(
f"Status: {result.status_code}"
f"\nReason: {result.reason}"
f"\nMessage: {result.json()['error']['message']}"
)
```

#### Get IP Enrichment

```python
Expand Down Expand Up @@ -463,7 +447,6 @@ PDLPY(sandbox=True)
| [Location Cleaner API](https://docs.peopledatalabs.com/docs/cleaner-apis#locationclean) | `PDLPY.location.cleaner(**params)` |
| [School Cleaner API](https://docs.peopledatalabs.com/docs/cleaner-apis#schoolclean) | `PDLPY.school.cleaner(**params)` |
| [Job Title Enrichment API](https://docs.peopledatalabs.com/docs/job-title-enrichment-api) | `PDLPY.job_title(**params)` |
| [Skill Enrichment API](https://docs.peopledatalabs.com/docs/skill-enrichment-api) | `PDLPY.skill(**params)` |
| [IP Enrichment API](https://docs.peopledatalabs.com/docs/ip-enrichment-api) | `PDLPY.ip(**params)` |

## 📘 Documentation <a name="documentation"></a>
Expand Down
212 changes: 106 additions & 106 deletions poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "peopledatalabs"
version = "5.0.3"
version = "6.0.0"
description = "Official Python client for the People Data Labs API"
homepage = "https://www.peopledatalabs.com"
repository = "https://github.com/peopledatalabs/peopledatalabs-python"
Expand Down
207 changes: 104 additions & 103 deletions requirements.txt

Large diffs are not rendered by default.

243 changes: 122 additions & 121 deletions requirements_dev.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/peopledatalabs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
from .main import PDLPY


__version__ = "5.0.3"
__version__ = "6.0.0"

__all__ = ["PDLPY"]
29 changes: 1 addition & 28 deletions src/peopledatalabs/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from .endpoints.location import Location
from .endpoints.school import School
from .logger import get_logger
from .models import AutocompleteModel, JobTitleModel, SkillModel, IPModel
from .models import AutocompleteModel, JobTitleModel, IPModel
from .requests import Request
from .settings import settings
from .utils import check_empty_parameters
Expand Down Expand Up @@ -94,33 +94,6 @@ def autocomplete(self, **kwargs):
validator=AutocompleteModel,
).get()

@check_empty_parameters
def skill(self, **kwargs):
"""
Calls PeopleDataLabs' skill API.

Args:
**kwargs: Parameters for the API as defined
in the documentation.

Returns:
A requests.Response object with the result of the HTTP call.
"""
url = Endpoint(self.api_key, self.base_path).get_url(
endpoint="skill/enrich"
)
return Request(
api_key=self.api_key,
url=url,
headers={
"Accept-Encoding": "gzip",
"User-Agent": "PDL-PYTHON-SDK",
"Content-Type": "application/json",
},
params=kwargs,
validator=SkillModel,
).get()

@check_empty_parameters
def job_title(self, **kwargs):
"""
Expand Down
10 changes: 0 additions & 10 deletions src/peopledatalabs/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,16 +100,6 @@ class AutocompleteModel(BaseRequestModel):
titlecase: Optional[bool]


class SkillModel(BaseRequestModel):
"""
Validator model for skill API.
"""

skill: str
pretty: Optional[bool]
titlecase: Optional[bool]


class JobTitleModel(BaseRequestModel):
"""
Validator model for job_title API.
Expand Down
2 changes: 1 addition & 1 deletion tests/client/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def test_version():
"""
Version check.
"""
assert __version__ == "5.0.3"
assert __version__ == "6.0.0"


@pytest.mark.usefixtures("fake_api_key")
Expand Down
37 changes: 0 additions & 37 deletions tests/client/test_skill.py

This file was deleted.

1 change: 0 additions & 1 deletion tests/company/test_company.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ def test_calls_unsupported_endpoints(client_with_fake_api_key):
"autocomplete",
"identify",
"retrieve",
"skill",
"job_title",
"ip",
]
Expand Down
1 change: 0 additions & 1 deletion tests/location/test_location.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ def test_calls_unsupported_endpoints(client_with_fake_api_key):
"identify",
"retrieve",
"search",
"skill",
"job_title",
"ip",
]
Expand Down
1 change: 0 additions & 1 deletion tests/school/test_school.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ def test_calls_unsupported_endpoints(client_with_fake_api_key):
"identify",
"retrieve",
"search",
"skill",
"job_title",
"ip",
]
Expand Down