xyxie 3 săptămâni în urmă
părinte
comite
c22d989b11
2 a modificat fișierele cu 6 adăugiri și 8 ștergeri
  1. 1 1
      services/kpler/excel.go
  2. 5 7
      services/kpler/liquid.go

+ 1 - 1
services/kpler/excel.go

@@ -265,7 +265,7 @@ func ProcessKplerData() error {
 
 
 
-// ParseSpecificKplerFormula parses the specific Kpler formula provided by the user
+// 旧版本的kpler插件生成的excel文件解析
 func ParseSpecificKplerFormulaV1() {
 	// The specific formula provided in the user's question
 	specificFormula := `=@'F:\Desktop\kpler\kpler-excel-addin.xlam'!GetFlows("China,","Russian Federation,Venezuela,Iran,EOPL,",,,,,"import","weekly","Total","kbd",FALSE,,FALSE,FALSE,FALSE,FALSE,TRUE,"CPP",)`

+ 5 - 7
services/kpler/liquid.go

@@ -17,10 +17,10 @@ func GetKplerDataByApi() {
 	// }
 	//  fmt.Println(token)
   token := "cU5INqLhj5FuKoC_sNVl4jWlH2jU2Jl2qVndCMuCKL2yT"
-	//initFlowIndex(token)
+	initFlowIndex(token)
   //getFlow(token)
-  //getLNGFlow(token)
-  getProduct(token)
+  //getProduct(token)
+  //getZone(token)
 }
 
 // 获取token登录凭证
@@ -201,13 +201,11 @@ func initFlowIndex(token string) {
   getFlow(token, flowDirection, split, granularity, products, startDate, endDate)
 }
 
-// 定期更新指标
-func updateFlowIndex() {
-
-}
 
 func getZone(token string) {
+  //url := "https://api.kpler.com/v1/zones"
   url := "https://api.kpler.com/v1/zones?ancestorName=Baltic%20Sea&descendantType=port"
+
   method := "GET"
 
   client := &http.Client {