Skip to content

Commit

Permalink
docs: Explained how the request URL is generated from url_base, `pa…
Browse files Browse the repository at this point in the history
…th` and the sync context (#2530)
  • Loading branch information
edgarrmondragon authored Jul 12, 2024
1 parent 9c755bf commit 544e275
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion singer_sdk/streams/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,17 @@ class RESTStream(Stream, t.Generic[_TToken], metaclass=abc.ABCMeta): # noqa: PL
@property
@abc.abstractmethod
def url_base(self) -> str:
"""Return the base url, e.g. ``https://api.mysite.com/v3/``."""
"""The base request URL, e.g. ``https://api.mysite.com/v3/``.
Request URLs are generated by combining `url_base` and `path`, and expanding any
context variables in the path.
For example, if ``url_base`` is ``https://api.mysite.com/v3/`` and ``path`` is
``users/{user_id}/orders``, then if the stream has a context of
``{"user_id": 123}`` generated by its parent stream with
:meth:`~singer_sdk.Stream.generate_child_contexts`, the full URL will be
``https://api.mysite.com/v3/users/123/orders``.
"""

def __init__(
self,
Expand Down

0 comments on commit 544e275

Please sign in to comment.