Skip to content

Commit

Permalink
boilerplate
Browse files Browse the repository at this point in the history
  • Loading branch information
amishas157 committed Nov 19, 2024
1 parent 095ebd8 commit 101902d
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 1 deletion.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ require (
github.com/spf13/cobra v1.7.0
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.17.0
github.com/stellar/go v0.0.0-20241118215915-73268d867ac7
github.com/stellar/go v0.0.0-20241119162825-0112a1d34a9a
github.com/stretchr/testify v1.9.0
github.com/xitongsys/parquet-go v1.6.2
github.com/xitongsys/parquet-go-source v0.0.0-20240122235623-d6294584ab18
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,8 @@ github.com/spf13/viper v1.17.0 h1:I5txKw7MJasPL/BrfkbA0Jyo/oELqVmux4pR/UxOMfI=
github.com/spf13/viper v1.17.0/go.mod h1:BmMMMLQXSbcHK6KAOiFLz0l5JHrU89OdIRHvsk0+yVI=
github.com/stellar/go v0.0.0-20241118215915-73268d867ac7 h1:fxAsQUayWTx2/IcqpDftU9Od6odnWQQPTM5WFc446pE=
github.com/stellar/go v0.0.0-20241118215915-73268d867ac7/go.mod h1:2jxuLI6d8tmmeauAgFYApGrBen5x/FlRfCdatzgRJ7s=
github.com/stellar/go v0.0.0-20241119162825-0112a1d34a9a h1:ymP2bH0UqTRZ3dpNu3VCHnhbQjmUo9e8WsJogGOu+/I=
github.com/stellar/go v0.0.0-20241119162825-0112a1d34a9a/go.mod h1:2jxuLI6d8tmmeauAgFYApGrBen5x/FlRfCdatzgRJ7s=
github.com/stellar/go-xdr v0.0.0-20231122183749-b53fb00bcac2 h1:OzCVd0SV5qE3ZcDeSFCmOWLZfEWZ3Oe8KtmSOYKEVWE=
github.com/stellar/go-xdr v0.0.0-20231122183749-b53fb00bcac2/go.mod h1:yoxyU/M8nl9LKeWIoBrbDPQ7Cy+4jxRcWcOayZ4BMps=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
Expand Down
34 changes: 34 additions & 0 deletions internal/input/retool.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package input

import (
"fmt"
"net/url"

"github.com/stellar/go/utils/apiclient"
)

// type RetoolDataInput struct {
// Id int32
// Name string
// Addresses []string
// HomeDomain string
// }

func GetRetoolData() error {
c := &apiclient.APIClient{
BaseURL: "https://xrri-vvsg-obfa.n7c.xano.io/api:glgSAjxV",
AuthType: "api_key",
AuthHeaders: map[string]interface{}{"api_key": "test-api-key"},
}
reqParams := apiclient.RequestParams{
RequestType: "GET",
Endpoint: "apps_details",
QueryParams: url.Values{},
}
result, err := c.CallAPI(reqParams)
// if err != nil {
// return fmt.Errorf("failed to call API: %w", err)
// }
fmt.Println("API Call Result:", result)
return err
}
12 changes: 12 additions & 0 deletions internal/input/retool_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package input

import (
"testing"
)

func TestGetRetoolData(t *testing.T) {
err := GetRetoolData()
if err != nil {
t.Fatalf("Error calling GetRetoolData: %v", err)
}
}

0 comments on commit 101902d

Please sign in to comment.