28 lines
634 B
TypeScript
28 lines
634 B
TypeScript
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),
|
|
}
|