Created
November 13, 2022 01:35
-
-
Save nickytonline/102bb45e625db6b9ae0157e293cfb0a3 to your computer and use it in GitHub Desktop.
Revisions
-
nickytonline created this gist
Nov 13, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ import "https://deno.land/x/dotenv/load.ts"; const response = await fetch("https://www.getrevue.co/api/v2/issues", { headers: { Authorization: `Token ${Deno.env.get("REVUE_API_KEY")}`, }, }); const issues = await response.json(); await Deno.writeFile( "./revue-newsletter-issues.json", new Uint8Array(new TextEncoder().encode(JSON.stringify(issues, null, 2))) );