From 8c48a7612d60f4a398a368dff4ff63501428f42b Mon Sep 17 00:00:00 2001 From: Sultan Iman <354868+sultaniman@users.noreply.github.com> Date: Mon, 13 May 2024 19:26:54 +0200 Subject: [PATCH] Update create-a-pipeline.md --- docs/website/docs/walkthroughs/create-a-pipeline.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/website/docs/walkthroughs/create-a-pipeline.md b/docs/website/docs/walkthroughs/create-a-pipeline.md index 0695f04bdc..bb00b2b44b 100644 --- a/docs/website/docs/walkthroughs/create-a-pipeline.md +++ b/docs/website/docs/walkthroughs/create-a-pipeline.md @@ -82,6 +82,11 @@ Your API key should be printed out to stdout along with some test data. >[!NOTE] > We will use dlt as an example project https://github.com/dlt-hub/dlt, feel free to replace it with your own repository. +Since we're using a personal access token, it's necessary to use `BearerTokenAuth` for passing the correct authentication details. +GitHub returns the next page link through the header parameter `link`. +Consequently, our `HeaderLinkPaginator` pagination strategy enables the rest client to seamlessly navigate through the pages and retrieve data. +For additional details, consult https://docs.github.com/en/rest/using-the-rest-api/using-pagination-in-the-rest-api?apiVersion=2022-11-28 + Modify `githubapi_resource` in `githubapi.py` to request issues data from your GitHub project's API: ```py @@ -103,11 +108,6 @@ def githubapi_resource(api_secret_key: str = dlt.secrets.value): yield page ``` -Since we're using a personal access token, it's necessary to use `BearerTokenAuth` for passing the correct authentication details. -GitHub returns the next page link through the header parameter `link`. -Consequently, our `HeaderLinkPaginator` pagination strategy enables the rest client to seamlessly navigate through the pages and retrieve data. -For additional details, consult https://docs.github.com/en/rest/using-the-rest-api/using-pagination-in-the-rest-api?apiVersion=2022-11-28 - ## 4. Load the data Uncomment the commented out code in `main` function in `githubapi.py`, so that running the