diff --git a/src/api/docs/docs.go b/src/api/docs/docs.go index ce18baa..5025966 100644 --- a/src/api/docs/docs.go +++ b/src/api/docs/docs.go @@ -110,7 +110,7 @@ const docTemplate = `{ "tags": [ "Addresses" ], - "summary": "Get contracts", + "summary": "Get Contracts", "parameters": [ { "type": "string", @@ -1024,7 +1024,7 @@ const docTemplate = `{ "tags": [ "Transactions" ], - "summary": "Get internal transactions by address", + "summary": "Get Internal Transactions By Address", "parameters": [ { "type": "integer", @@ -1078,7 +1078,7 @@ const docTemplate = `{ "tags": [ "Transactions" ], - "summary": "Get internal transactions by block number", + "summary": "Get Internal Transactions By Block Number", "parameters": [ { "type": "integer", @@ -1132,7 +1132,7 @@ const docTemplate = `{ "tags": [ "Transactions" ], - "summary": "Get internal transactions by hash", + "summary": "Get Internal Transactions By Hash", "parameters": [ { "type": "integer", @@ -1186,7 +1186,7 @@ const docTemplate = `{ "tags": [ "Transactions" ], - "summary": "Get token holders by token contract", + "summary": "Get Token Holders By Token Contract", "parameters": [ { "type": "integer", @@ -1240,7 +1240,7 @@ const docTemplate = `{ "tags": [ "Transactions" ], - "summary": "Get token transfers", + "summary": "Get Token Transfers", "parameters": [ { "type": "integer", @@ -1329,7 +1329,7 @@ const docTemplate = `{ "tags": [ "Transactions" ], - "summary": "Get token transfer by address", + "summary": "Get Token Transfer By Address", "parameters": [ { "type": "integer", @@ -1383,7 +1383,7 @@ const docTemplate = `{ "tags": [ "Transactions" ], - "summary": "Get token transfers by token contract", + "summary": "Get Token Transfers By Token Contract", "parameters": [ { "type": "integer", diff --git a/src/api/docs/swagger.json b/src/api/docs/swagger.json index 68fcc7a..7e00989 100644 --- a/src/api/docs/swagger.json +++ b/src/api/docs/swagger.json @@ -102,7 +102,7 @@ "tags": [ "Addresses" ], - "summary": "Get contracts", + "summary": "Get Contracts", "parameters": [ { "type": "string", @@ -1016,7 +1016,7 @@ "tags": [ "Transactions" ], - "summary": "Get internal transactions by address", + "summary": "Get Internal Transactions By Address", "parameters": [ { "type": "integer", @@ -1070,7 +1070,7 @@ "tags": [ "Transactions" ], - "summary": "Get internal transactions by block number", + "summary": "Get Internal Transactions By Block Number", "parameters": [ { "type": "integer", @@ -1124,7 +1124,7 @@ "tags": [ "Transactions" ], - "summary": "Get internal transactions by hash", + "summary": "Get Internal Transactions By Hash", "parameters": [ { "type": "integer", @@ -1178,7 +1178,7 @@ "tags": [ "Transactions" ], - "summary": "Get token holders by token contract", + "summary": "Get Token Holders By Token Contract", "parameters": [ { "type": "integer", @@ -1232,7 +1232,7 @@ "tags": [ "Transactions" ], - "summary": "Get token transfers", + "summary": "Get Token Transfers", "parameters": [ { "type": "integer", @@ -1321,7 +1321,7 @@ "tags": [ "Transactions" ], - "summary": "Get token transfer by address", + "summary": "Get Token Transfer By Address", "parameters": [ { "type": "integer", @@ -1375,7 +1375,7 @@ "tags": [ "Transactions" ], - "summary": "Get token transfers by token contract", + "summary": "Get Token Transfers By Token Contract", "parameters": [ { "type": "integer", diff --git a/src/api/docs/swagger.yaml b/src/api/docs/swagger.yaml index d089c60..9c2f8a0 100644 --- a/src/api/docs/swagger.yaml +++ b/src/api/docs/swagger.yaml @@ -440,7 +440,7 @@ paths: schema: additionalProperties: true type: object - summary: Get contracts + summary: Get Contracts tags: - Addresses /api/v1/addresses/details/{address}: @@ -1031,7 +1031,7 @@ paths: schema: additionalProperties: true type: object - summary: Get internal transactions by hash + summary: Get Internal Transactions By Hash tags: - Transactions /api/v1/transactions/internal/address/{address}: @@ -1067,7 +1067,7 @@ paths: schema: additionalProperties: true type: object - summary: Get internal transactions by address + summary: Get Internal Transactions By Address tags: - Transactions /api/v1/transactions/internal/block-number/{block_number}: @@ -1103,7 +1103,7 @@ paths: schema: additionalProperties: true type: object - summary: Get internal transactions by block number + summary: Get Internal Transactions By Block Number tags: - Transactions /api/v1/transactions/token-holders/token-contract/{token_contract_address}: @@ -1139,7 +1139,7 @@ paths: schema: additionalProperties: true type: object - summary: Get token holders by token contract + summary: Get Token Holders By Token Contract tags: - Transactions /api/v1/transactions/token-transfers: @@ -1198,7 +1198,7 @@ paths: schema: additionalProperties: true type: object - summary: Get token transfers + summary: Get Token Transfers tags: - Transactions /api/v1/transactions/token-transfers/address/{address}: @@ -1234,7 +1234,7 @@ paths: schema: additionalProperties: true type: object - summary: Get token transfer by address + summary: Get Token Transfer By Address tags: - Transactions /api/v1/transactions/token-transfers/token-contract/{token_contract_address}: @@ -1270,7 +1270,7 @@ paths: schema: additionalProperties: true type: object - summary: Get token transfers by token contract + summary: Get Token Transfers By Token Contract tags: - Transactions /metadata: diff --git a/src/api/rest/addresses.go b/src/api/rest/addresses.go index a7fa2bd..fe8b3a4 100644 --- a/src/api/rest/addresses.go +++ b/src/api/rest/addresses.go @@ -3,9 +3,10 @@ package rest import ( "encoding/json" "errors" - "gorm.io/gorm" "strconv" + "gorm.io/gorm" + fiber "github.com/gofiber/fiber/v2" "go.uber.org/zap" @@ -197,7 +198,7 @@ type ContractsQuery struct { } // Contract -// @Summary Get contracts +// @Summary Get Contracts // @Description get list of contracts // @Tags Addresses // @BasePath /api/v1 diff --git a/src/api/rest/transactions.go b/src/api/rest/transactions.go index 054a1d7..2fe5ed5 100644 --- a/src/api/rest/transactions.go +++ b/src/api/rest/transactions.go @@ -4,12 +4,13 @@ import ( "encoding/json" "errors" "fmt" + "strconv" + "sync" + fiber "github.com/gofiber/fiber/v2" "github.com/sudoblockio/icon-go-api/models" "go.uber.org/zap" "gorm.io/gorm" - "strconv" - "sync" "github.com/sudoblockio/icon-go-api/config" "github.com/sudoblockio/icon-go-api/crud" @@ -479,7 +480,7 @@ func handlerGetTransactionAddress(c *fiber.Ctx) error { } // Internal transactions by hash -// @Summary Get internal transactions by hash +// @Summary Get Internal Transactions By Hash // @Description Get internal transactions by hash // @Tags Transactions // @BasePath /api/v1 @@ -551,7 +552,7 @@ func handlerGetInternalTransactionsByHash(c *fiber.Ctx) error { } // Internal transactions by address -// @Summary Get internal transactions by address +// @Summary Get Internal Transactions By Address // @Description Get internal transactions by address // @Tags Transactions // @BasePath /api/v1 @@ -625,7 +626,7 @@ func handlerGetInternalTransactionsAddress(c *fiber.Ctx) error { } // Internal transactions by block number -// @Summary Get internal transactions by block number +// @Summary Get Internal Transactions By Block Number // @Description Get internal transactions by block number // @Tags Transactions // @BasePath /api/v1 @@ -704,7 +705,7 @@ func handlerGetInternalTransactionsBlockNumber(c *fiber.Ctx) error { } // TokenTransfers -// @Summary Get token transfers +// @Summary Get Token Transfers // @Description get historical token transfers // @Tags Transactions // @BasePath /api/v1 @@ -794,7 +795,7 @@ func handlerGetTokenTransfers(c *fiber.Ctx) error { } // TokenTransfersAddress -// @Summary Get token transfer by address +// @Summary Get Token Transfer By Address // @Description get historical token transfers by address // @Tags Transactions // @BasePath /api/v1 @@ -869,7 +870,7 @@ func handlerGetTokenTransfersAddress(c *fiber.Ctx) error { } // TokenTransfersTokenContract -// @Summary Get token transfers by token contract +// @Summary Get Token Transfers By Token Contract // @Description get historical token transfers by token contract // @Tags Transactions // @BasePath /api/v1 @@ -944,7 +945,7 @@ func handlerGetTokenTransfersTokenContract(c *fiber.Ctx) error { } // TokenAddressesTokenContract -// @Summary Get token holders by token contract +// @Summary Get Token Holders By Token Contract // @Description get token holders // @Tags Transactions // @BasePath /api/v1