|
|
|
@ -1,3 +1,7 @@
|
|
|
|
|
// test account (avicious.406+test@gmail.com) API key
|
|
|
|
|
// eZbV6TDcl2qUmtEAMLllN8qOHeb1hQiS8sVEoG2OmfqLym4UqihiFL83xgM2SLGPtz8HS2DeX45sk89B
|
|
|
|
|
// test offer id: https://hhtestnet.com/offers/F8W2srPJK2JKwYdh
|
|
|
|
|
// TODO: unmarshal json (encoding/json)
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
@ -14,6 +18,14 @@ const (
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type Notification struct {
|
|
|
|
|
Id int `json:"id"`
|
|
|
|
|
Title string `json:"title"`
|
|
|
|
|
Body string `json:"body"`
|
|
|
|
|
Link string `json:"link"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type response struct {
|
|
|
|
|
Status string `json:"status"`
|
|
|
|
|
ExchangeRateProviders []struct {
|
|
|
|
@ -23,7 +35,6 @@ type response struct {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
|
fmt.Println("hello world")
|
|
|
|
|
//body:= strings.NewReader(' -X POST -H "Authorization: Bearer ***REMOVED***" -H "Content-Type: application/json"`)
|
|
|
|
|
req, err := http.NewRequest("POST", TestApiEndpoint + "/notifications/read", nil)
|
|
|
|
|
if err != nil {
|
|
|
|
@ -45,5 +56,4 @@ func main() {
|
|
|
|
|
fmt.Println(string(body))
|
|
|
|
|
|
|
|
|
|
defer resp.Body.Close()
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|