Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
pkieltyka committed Jan 23, 2024
1 parent 2bb179c commit 26a7479
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ type Options struct {
APIServiceURL string
}

// NewAPI creates a new Sequence API client instance. Please see https://sequence.build to
// get a `projectAccessKey`.
func NewAPI(projectAccessKey string, options ...Options) API {
opts := Options{}
if len(options) > 0 {
Expand Down
6 changes: 4 additions & 2 deletions indexer/indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ type Options struct {
JWTAuthToken string
}

func NewIndexer(indexerServiceURL string, projectAccessKey string, options ...Options) Indexer {
// NewIndexer creates a new Sequence Indexer client instance. See https://docs.sequence.xyz for a list of
// indexer urls, and please see https://sequence.build to get a `projectAccessKey`.
func NewIndexer(indexerURL string, projectAccessKey string, options ...Options) Indexer {
opts := Options{}
if len(options) > 0 {
opts = options[0]
Expand All @@ -27,7 +29,7 @@ func NewIndexer(indexerServiceURL string, projectAccessKey string, options ...Op
client.jwtAuthHeader = fmt.Sprintf("BEARER %s", opts.JWTAuthToken)
}

return NewIndexerClient(indexerServiceURL, client)
return NewIndexerClient(indexerURL, client)
}

type httpclient struct {
Expand Down
2 changes: 2 additions & 0 deletions metadata/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ type Options struct {
MetadataServiceURL string
}

// NewMetadata creates a new Sequence Metadata client instance. Please see
// https://sequence.build to get a `projectAccessKey`.
func NewMetadata(projectAccessKey string, options ...Options) Metadata {
opts := Options{}
if len(options) > 0 {
Expand Down

0 comments on commit 26a7479

Please sign in to comment.