Skip to content

Commit

Permalink
chore(release): 0.6.0 [skip ci]
Browse files Browse the repository at this point in the history
# [0.6.0](v0.5.0...v0.6.0) (2025-01-28)

### Features

* Migrate from result4js to neverthrow ([f1e3c5a](f1e3c5a))
  • Loading branch information
semantic-release-bot committed Jan 28, 2025
1 parent 9b0a0eb commit c3843ec
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 26 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# [0.6.0](https://github.com/suzuki3jp/youtubes.js/compare/v0.5.0...v0.6.0) (2025-01-28)


### Features

* Migrate from result4js to neverthrow ([f1e3c5a](https://github.com/suzuki3jp/youtubes.js/commit/f1e3c5acbde71c5f2c2b690ab88eb6c2d5da8e1c))

# [0.5.0](https://github.com/suzuki3jp/youtubes.js/compare/v0.4.5...v0.5.0) (2025-01-22)


Expand Down
9 changes: 6 additions & 3 deletions docs/api/youtubes.js.pagination.all.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,11 @@ const oauth = new StaticOAuthProvider({
});
const client = new ApiClient({ oauth });

// THIS IS UNSAFE ERROR HANDLING. See the safe error handling in the README.md Introduction.
const playlists = (await client.playlists.getMine()).throw();
const allPlaylists = (await playlists.all()).throw().flat();
const playlists = await client.playlists.getMine();
if (playlists.isErr()) {
// Handle the error
return;
}
const allPlaylists = (await playlists.all()).flat();
```

12 changes: 6 additions & 6 deletions docs/api/youtubes.js.pagination.next.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ const oauth = new StaticOAuthProvider({
});
const client = new ApiClient({ oauth });


// THIS IS UNSAFE ERROR HANDLING. See the safe error handling in the README.md Introduction.
const playlists = (await client.playlists.getMine()).throw();
console.log(playlists.data); // The first page of playlists
const nextPage = (await playlists.next()).throw();
console.log(nextPage?.data); // The second page of playlists or null if there is no next page
const playlists = await client.playlists.getMine();
if (playlists.isErr()) return;
console.log(playlists.value); // The first page of playlists
const nextPage = await playlists.next();
if (nextPage?.isErr()) return;
console.log(nextPage?.value); // The second page of playlists or null if there is no next page
```

12 changes: 6 additions & 6 deletions docs/api/youtubes.js.pagination.prev.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ const oauth = new StaticOAuthProvider({
});
const client = new ApiClient({ oauth });


// THIS IS UNSAFE ERROR HANDLING. See the safe error handling in the README.md Introduction.
const playlists = (await client.playlists.getMine()).throw();
console.log(playlists.data); // The first page of playlists
const prevPage = (await playlists.prev()).throw();
console.log(prevPage?.data); // The previous page of playlists or null if there is no previous page
const playlists = await client.playlists.getMine();
if (playlists.isErr()) return;
console.log(playlists.value); // The first page of playlists
const prevPage = await playlists.prev();
if (prevPage?.isErr()) return;
console.log(prevPage?.value); // The previous page of playlists or null if there is no previous page
```

4 changes: 1 addition & 3 deletions docs/api/youtubes.js.playlistmanager.getbychannelid.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ const oauth = new StaticOAuthProvider({
accessToken: "ACCESS_TOKEN",
});
const client = new ApiClient({ oauth });

// THIS IS UNSAFE ERROR HANDLING. See the safe error handling in the README.md Introduction.
const playlists = (await client.playlists.getByChannelId("CHANNEL_ID")).throw(); // Pagination<Playlist[]>
const playlists = await client.playlists.getByChannelId("CHANNEL_ID"); // Result<Pagination<Playlist[]>, YouTubesJsErrors>
```

4 changes: 1 addition & 3 deletions docs/api/youtubes.js.playlistmanager.getbyids.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ const oauth = new StaticOAuthProvider({
accessToken: "ACCESS_TOKEN",
});
const client = new ApiClient({ oauth });

// THIS IS UNSAFE ERROR HANDLING. See the safe error handling in the README.md Introduction.
const playlists = (await client.playlists.getByIds(["ID1", "ID2"])).throw(); // Pagination<Playlist[]>
const playlists = await client.playlists.getByIds(["ID1", "ID2"]) // Result<Pagination<Playlist[]>, YouTubesJsErrors>
```

3 changes: 1 addition & 2 deletions docs/api/youtubes.js.playlistmanager.getmine.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ const oauth = new StaticOAuthProvider({
});

const client = new ApiClient({ oauth });
// THIS IS UNSAFE ERROR HANDLING. See the safe error handling in the README.md Introduction.
const playlists = (await client.playlists.getMine()).throw(); // Pagination<Playlist[]>
const playlists = await client.playlists.getMine(); // Result<Pagination<Playlist[]>, YouTubesJsErrors>
```

4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "youtubes.js",
"description": "A JavaScript client for YouTube Data API v3.",
"version": "0.5.0",
"version": "0.6.0",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"keywords": [
Expand Down

0 comments on commit c3843ec

Please sign in to comment.