This repository has been archived by the owner on Jul 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
13 changed files
with
84 additions
and
277 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
/* | ||
* @Author: ph4nt0mer | ||
* @Date: 2022-09-01 15:36:10 | ||
* @LastEditors: ph4nt0mer [email protected] | ||
* @LastEditTime: 2022-09-01 22:55:24 | ||
* @FilePath: /quake_go/src/apis/api.go | ||
* @Description: | ||
* | ||
* Copyright (c) 2022 by ph4nt0mer, All Rights Reserved. | ||
*/ | ||
package apis | ||
|
||
import ( | ||
"fmt" | ||
"quake/src/setting" | ||
"quake/src/tools" | ||
) | ||
|
||
func FilterableServiceGET(token string) { | ||
// 获取服务数据筛选字段 | ||
// curl -X GET "https://quake.360.cn/api/v3/filterable/field/quake_service" -H "X-QuakeToken: d17140ae-xxxx-xxx-xxxx-c0818b2bbxxx" | ||
uri := "/filterable/field/quake_service" | ||
tools.ApisGet(setting.URL+uri, token) | ||
} | ||
func SearchServicePost(query string, start string, size string, token string) { | ||
// 服务数据实时查询接口 | ||
// curl -X POST "https://quake.360.cn/api/v3/search/quake_service" -H "X-QuakeToken: d17140ae-xxxx-xxx-xxxx-c0818b2bbxxx" -H "Content-Type: application/json" -d '{ | ||
// "query": "service: http", | ||
// "start": 20, | ||
// "size": 10, | ||
// "ignore_cache": false, | ||
// "start_time": "2021-01-01 00:00:00", | ||
// "end_time": "2021-02-01 00:00:00" | ||
// }' | ||
if query == "" || query == "?" { | ||
fmt.Println("No query specified") | ||
return | ||
} | ||
uri := "/search/quake_service" | ||
payload := "{\"query\":\"" + query + | ||
"\",\"start\":\"" + start + "\",\"size\":\"" + size + | ||
"\"}" | ||
tools.ApisPost(setting.URL+uri, payload, start, size, token) | ||
} | ||
func ScrollServicePost(query string, start string, size string, token string) { | ||
// 服务数据深度查询接口 | ||
// curl -X POST "https://quake.360.cn/api/v3/scroll/quake_service" -H "X-QuakeToken: d17140ae-xxxx-xxx-xxxx-c0818b2bbxxx" -H "Content-Type: application/json" -d '{ | ||
// "query": "service: http", | ||
// "size": 100, | ||
// "ignore_cache": false, | ||
// "start_time": "2021-01-07 00:13:14", | ||
// "end_time": "2021-05-20 01:13:14" | ||
// }' | ||
uri := "/scroll/quake_service" | ||
tools.ApisPost(setting.URL+uri, query, start, size, token) | ||
} | ||
func AggregationServiceGet(token string) { | ||
// 获取聚合数据筛选字段 | ||
// curl -X GET "https://quake.360.cn/api/v3/aggregation/quake_service" -H "X-QuakeToken: d17140ae-xxxx-xxx-xxxx-c0818b2bbxxx" | ||
uri := "/aggregation/quake_service" | ||
tools.ApisGet(setting.URL+uri, token) | ||
} | ||
func AggregationServicePost(query string, start string, size string, token string) { | ||
// 获取聚合数据筛选字段 | ||
// curl -X GET "https://quake.360.cn/api/v3/aggregation/quake_service" -H "X-QuakeToken: d17140ae-xxxx-xxx-xxxx-c0818b2bbxxx" | ||
uri := "/aggregation/quake_service" | ||
tools.ApisPost(setting.URL+uri, query, start, size, token) | ||
} | ||
func InfoGet(token string) { | ||
// 个人信息接口 | ||
uri := "/user/info" | ||
tools.ApisGet(setting.URL+uri, token) | ||
} | ||
func FaviconPost(query string, start string, size string, token string) { | ||
uri := "/query/similar_icon/aggregation" | ||
tools.ApisGet(setting.URL+uri, token) | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.