avant codex
This commit is contained in:
27
frontend/src/api/lunar.ts
Normal file
27
frontend/src/api/lunar.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import client from './client'
|
||||
|
||||
export interface LunarDay {
|
||||
date: string
|
||||
phase: string
|
||||
illumination: number
|
||||
croissante_decroissante: string
|
||||
montante_descendante: string
|
||||
signe: string
|
||||
type_jour: string
|
||||
perigee: boolean
|
||||
apogee: boolean
|
||||
noeud_lunaire: boolean
|
||||
}
|
||||
|
||||
export interface Dicton {
|
||||
id: number
|
||||
mois: number
|
||||
jour?: number
|
||||
texte: string
|
||||
region?: string
|
||||
}
|
||||
|
||||
export const lunarApi = {
|
||||
getMonth: (month: string) => client.get<LunarDay[]>('/api/lunar', { params: { month } }).then(r => r.data),
|
||||
getDictons: (mois: number) => client.get<Dicton[]>('/api/dictons', { params: { mois } }).then(r => r.data),
|
||||
}
|
||||
Reference in New Issue
Block a user