package shop.alien.api.feign;

import com.alibaba.fastjson.JSONObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 调用聚合接口
 *
 * @author ssk
 * @version 1.0
 * @date 2024/10/24 14:19
 */
@FeignClient(url = "https://v.juhe.cn", name = "juhe")
public interface JuHeFeign {

    /**
     * 聚合-万年历-获取当天的详细信息
     * 每日配额50,会员无限制
     * https://www.juhe.cn/docs/api/id/177
     *
     * @param date 指定日期,格式为YYYY-MM-DD,如月份和日期小于10,则取个位,如:2012-1-1
     * @param key  您申请的appKey
     * @return JSONObject
     */
    @GetMapping("/calendar/day")
    JSONObject calendarDay(@RequestParam(value = "date") String date,
                           @RequestParam(value = "key") String key);

}
