Skip to content

Commit

Permalink
Update create-a-pipeline.md
Browse files Browse the repository at this point in the history
  • Loading branch information
sultaniman authored May 13, 2024
1 parent 8cb13c8 commit 8c48a76
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/website/docs/walkthroughs/create-a-pipeline.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 8c48a76

Please sign in to comment.