Skip to content

Commit

Permalink
draft: Search through podcast episodes #3
Browse files Browse the repository at this point in the history
  • Loading branch information
olavea committed Nov 29, 2023
1 parent c054a63 commit e1960e9
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 0 deletions.
41 changes: 41 additions & 0 deletions package-lock.json

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

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,8 @@
"astro": "^3.4.3",
"prettier": "^3.0.3",
"prettier-plugin-astro": "^0.12.0"
},
"dependencies": {
"podcast-api": "^2.0.4"
}
}
17 changes: 17 additions & 0 deletions src/components/SearchEpisodes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const { Client } = require("podcast-api");

// See 1Password for apiKey or
// If apiKey is null, then we will connect to a mock server
// that returns fake data for testing purposes.
const client = Client({ apiKey: import.meta.env.PUBLIC_BLEH });
client
.searchEpisodeTitles({
q: "Dev-Life",
})
.then((response) => {
// Get response json data here
console.log(response.data);
})
.catch((error) => {
console.log(error);
});
1 change: 1 addition & 0 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ import SignUp from "../components/SignUp.astro";
<iframe
src="https://www.tldraw.com/v/3Fm1saCUgL4FnXHC7QUH_?viewport=1288,455,3676,1857&page=page%3Apage"
></iframe>
<iframe src="https://www.listennotes.com/e/63405e9de44c49fda392918584c236c8/embed/" height="180px" width="100%" style="width: 1px; min-width: 100%;" frameborder="0" scrolling="no" loading="lazy"></iframe>
</main>
</Layout>

Expand Down

0 comments on commit e1960e9

Please sign in to comment.