-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
34 lines (29 loc) · 817 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package main
import (
"fmt"
"io/ioutil"
"strings"
"github.com/bmacer/webex-bot/api"
)
func main() {
// test_room := "Y2lzY29zcGFyazovL3VzL1JPT00vZjc0NzM0NDAtMGJmMy0xMWVjLWJmZjctOTNiMGQxYTk5MzEx"
// x := api.PostMessage(test_room, "test")
// fmt.Println(x)
// for i := 0; i < 5; i++ {
ac, _ := ioutil.ReadFile("card copy.json")
acs := string(ac)
// r := food.GetRandomRecipes()
// text := fmt.Sprint(r.Recipes[i].Id) + " " + r.Recipes[i].Title
text := "Replaced"
acs = strings.Replace(acs, "1REPLACEME1", text, 1)
acs = strings.Replace(acs, "2REPLACEME2", text, 1)
aca := api.AdaptiveCardAttachment{
ContentType: "application/vnd.microsoft.card.adaptive",
Content: acs,
}
y := api.PostMessageWithAdaptiveCard(api.GetRooms().Items[1].Id, aca)
fmt.Println(y)
// }
//
// server.Run()
}