All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ape9527.core.controller.OtherApiController Maven / Gradle / Ivy

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));
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy