Skip to content
Merged
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
9 changes: 5 additions & 4 deletions exonetapi/structures/ApiResourceIdentifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,18 @@ def get(self):
return exonetapi.RequestBuilder(self.type()).get(self.id())

def related(self, name):
"""Define a new relation for the resource. Can be used to make new requests to the API.
"""Define a new relation for the resource. Can be used to make
new requests to the API.

:param name: The name of the relation.
:return Relation: The new relation.
"""
return Relation(name, self.type(), self.id())

def relationship(self, name, *data):
"""Define a new relationship for this resource, replace an existing one or get an
existing one. When data is provided the relationship is set, without data the
relationship is returned.
"""Define a new relationship for this resource, replace an existing
one or get an existing one. When data is provided the relationship
is set, without data the relationship is returned.

:param name: The name of the relation to set.
:param data: The value of the relation, can be a ApiResource or a dict
Expand Down
132 changes: 66 additions & 66 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ requests = "^2.27.1"

[tool.poetry.dev-dependencies]
black = {version = "^22.6.0", allow-prereleases = true}
flake8 = "^4.0.1"
flake8 = "^5.0.4"
pytest = "^7.1.2"
pytest-cov = "^3.0.0"
bandit = "^1.7.4"
Expand Down