Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ Ref: https://keepachangelog.com/en/1.0.0/

# Changelog

## [Unreleased]

### Bug Fixes

* [#39](https://github.com/JulianToledano/goingecko/pull/39) Change CodeStats types from int16 to int64.

## [v3.0.0](https://github.com/JulianToledano/goingecko/releases/tag/v3.0.0) - 2025.01-25

### Improvements
Expand Down
39 changes: 39 additions & 0 deletions api/coins/id_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package coins

import (
"context"
"net/http"
"testing"

"github.com/JulianToledano/goingecko/v3/api/internal"
geckohttp "github.com/JulianToledano/goingecko/v3/http"
)

func TestCoinsId(t *testing.T) {
tests := []struct {
name string
id string
}{
{
name: "stellar",
id: "stellar",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
c := &CoinsClient{
internal.NewClient(
geckohttp.NewClient(geckohttp.WithHttpClient(http.DefaultClient)),
internal.BaseURL,
),
}
got, err := c.CoinsId(context.Background(), tt.id)
if err != nil {
t.Errorf("CoinsList() error = %v", err)
}
if got == nil {
t.Errorf("CoinsList() got = nil, want not nil")
}
})
}
}
4 changes: 2 additions & 2 deletions api/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ type DeveloperData struct {
}

type CodeStats struct {
Additions int16 `json:"additions"`
Deletions int16 `json:"deletions"`
Additions int64 `json:"additions"`
Deletions int64 `json:"deletions"`
}

type PublicInterestStats struct {
Expand Down
Loading