Skip to content

Commit

Permalink
Fix fetch pie endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoelho93 committed May 5, 2024
1 parent 0aff387 commit 2bde031
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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 = "python-trading212"
version = "2.0.1"
version = "2.0.2"
description = "An unofficial client for the official Trading212 API"
authors = ["José Coelho <16445494+jcoelho93@users.noreply.github.com>"]
readme = "README.md"
Expand Down
6 changes: 3 additions & 3 deletions trading212/trading212.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def delete_pie(self, id: int) -> None:
Args:
id (int): the ID of the pie
"""
endpoint = self.url + f"equity/pie/{id}"
endpoint = self.url + f"equity/pies/{id}"
return self._delete(endpoint)

def fetch_pie(self, id: int) -> Pie:
Expand All @@ -144,7 +144,7 @@ def fetch_pie(self, id: int) -> Pie:
Returns:
Pie: the pie
"""
endpoint = self.url + f"equity/pie/{id}"
endpoint = self.url + f"equity/pies/{id}"
response = self._get(endpoint)

return Pie(**response)
Expand All @@ -161,7 +161,7 @@ def update_pie(self, id: int, pie: Pie) -> Pie:
Returns:
Pie: the new pie
"""
endpoint = self.url + f"equity/pie/{id}"
endpoint = self.url + f"equity/pies/{id}"
response = self._post(endpoint, pie.model_dump())

return Pie(**response)
Expand Down

0 comments on commit 2bde031

Please sign in to comment.