1import { fetch } from "https://esm.town/v/std/fetch";
2
3interface BaseResponse {
64
65 private static async makeRequest<T>(endpoint: string, options: RequestInit): Promise<T> {
66 const response = await fetch(`${this.BASE_URL}${endpoint}`, options);
67 const data = await response.json();
68 if (!response.ok) {
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export enum TempoColorCode {
18
19 static async getToday(): Promise<TempoResponse> {
20 const response = await fetch(this.BASE_URL + "/today");
21 if (!response.ok) {
22 throw new Error(`Impossible de reĢcupeĢrer les informations du jour : ${response.statusText}`);
27
28 static async getTomorrow(): Promise<TempoResponse> {
29 const response = await fetch(this.BASE_URL + "/tomorrow");
30 if (!response.ok) {
31 throw new Error(`Impossible de reĢcupeĢrer les informations du lendemain : ${response.statusText}`);
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export class NtfyService {
20 }
21
22 const response = await fetch("https://ntfy.sh/" + Deno.env.get("NTFY_CHANNEL"), {
23 method: "POST",
24 body: message,
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({