com.ape9527.core.controller.OtherApiController Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ape-core Show documentation
Show all versions of ape-core Show documentation
Ape low code platform core module
The newest version!
package com.ape9527.core.controller;
import com.alibaba.fastjson.JSONObject;
import com.ape9527.auth.annotation.LoginAuth;
import com.ape9527.core.model.AjaxResult;
import com.ape9527.utils.http.HttpsUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @author YuanShuai[[email protected]]
*/
@Api(tags = "OtherApiController", description = "其他API调用")
@RestController
@RequestMapping("/api/other")
public class OtherApiController {
@ApiOperation("微博热搜")
@LoginAuth
@GetMapping("/weibo/hotSearch")
public AjaxResult getWeiboHotSearch(){
String url = "https://weibo.com/ajax/side/hotSearch";
String response = HttpsUtil.sendSslGet(url, null, "UTF-8", "UTF-8");
return AjaxResult.success(JSONObject.parseObject(response));
}
}