appbaseio / appbaseio/go-appbase
SearchStreamToURL() method fails `go test`
- Ngôn ngữ chính
- Go
- Star
- 5
- Fork
- 3
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
I am noticing that webhooks do not get registered in appbase when using the `SearchStreamToURL()` method. The same method with the same app works for the JS lib works successfully (i.e. streams to the mockbin URL when the query condition matches).
I also notice that a corresponding document isn't created in the .percolator type for the webhook. This implies a likely bug / formatting issue in the go-appbase lib.
``` go
package main
import "github.com/appbaseio/go-appbase"
import "log"
import "fmt"
func main() {
client, _ := appbase.NewClient("https://scalr.api.appbase.io", "mj8IvN7DY", "c01fd88a-250e-4321-85bf-51574d5141dc", "go-test")
err := client.Ping()
if err != nil {
log.Fatalln(err)
}
fmt.Println("Client created")
testtype := "tweet2"
webhook := appbase.NewWebhook()
webhook.URL = "https://www.mockbin.org/bin/cd6461ab-468f-42f5-865f-4eed22daae95"
webhook.Method = "POST"
webhook.Body = "hellowebhooks"
const query1 string = `{"query":{"match_all":{}}}`
searchStreamToURLResponse, err := client.SearchStreamToURL().Type(testtype).Query(query1).AddWebhook(webhook).Do()
if err != nil {
log.Fatalln(err)
return
}
fmt.Println(searchStreamToURLResponse)
}
```
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.