Skip to content

Commit

Permalink
fix: use snake_case in friend metadata response
Browse files Browse the repository at this point in the history
  • Loading branch information
baenv authored and sp.bean committed Sep 18, 2023
1 parent 3a7d3e6 commit 44def76
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 35 deletions.
20 changes: 13 additions & 7 deletions docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -8425,6 +8425,9 @@ const docTemplate = `{
"channel_id": {
"type": "string"
},
"channel_name": {
"type": "string"
},
"each": {
"type": "boolean"
},
Expand Down Expand Up @@ -9498,7 +9501,7 @@ const docTemplate = `{
"address": {
"type": "string"
},
"createdAt": {
"created_at": {
"type": "string"
},
"holders": {
Expand All @@ -9510,24 +9513,27 @@ const docTemplate = `{
"price": {
"type": "number"
},
"profileChecked": {
"price_change_percentage": {
"type": "number"
},
"profile_checked": {
"type": "boolean"
},
"supply": {
"type": "integer"
},
"twitterPfpUrl": {
"twitter_pfp_url": {
"type": "string"
},
"twitterUsername": {
"twitter_username": {
"type": "string"
},
"updatedAt": {
"updated_at": {
"type": "string"
}
}
},
"response.FriendTechKeyWatchlistItemRespose": {
"response.FriendTechKeyWatchlistItemResponse": {
"type": "object",
"properties": {
"created_at": {
Expand Down Expand Up @@ -12228,7 +12234,7 @@ const docTemplate = `{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/response.FriendTechKeyWatchlistItemRespose"
"$ref": "#/definitions/response.FriendTechKeyWatchlistItemResponse"
}
}
},
Expand Down
20 changes: 13 additions & 7 deletions docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -8417,6 +8417,9 @@
"channel_id": {
"type": "string"
},
"channel_name": {
"type": "string"
},
"each": {
"type": "boolean"
},
Expand Down Expand Up @@ -9490,7 +9493,7 @@
"address": {
"type": "string"
},
"createdAt": {
"created_at": {
"type": "string"
},
"holders": {
Expand All @@ -9502,24 +9505,27 @@
"price": {
"type": "number"
},
"profileChecked": {
"price_change_percentage": {
"type": "number"
},
"profile_checked": {
"type": "boolean"
},
"supply": {
"type": "integer"
},
"twitterPfpUrl": {
"twitter_pfp_url": {
"type": "string"
},
"twitterUsername": {
"twitter_username": {
"type": "string"
},
"updatedAt": {
"updated_at": {
"type": "string"
}
}
},
"response.FriendTechKeyWatchlistItemRespose": {
"response.FriendTechKeyWatchlistItemResponse": {
"type": "object",
"properties": {
"created_at": {
Expand Down Expand Up @@ -12220,7 +12226,7 @@
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/response.FriendTechKeyWatchlistItemRespose"
"$ref": "#/definitions/response.FriendTechKeyWatchlistItemResponse"
}
}
},
Expand Down
34 changes: 19 additions & 15 deletions docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1442,6 +1442,8 @@ definitions:
type: string
channel_id:
type: string
channel_name:
type: string
each:
type: boolean
guild_id:
Expand Down Expand Up @@ -2142,26 +2144,28 @@ definitions:
properties:
address:
type: string
createdAt:
created_at:
type: string
holders:
type: integer
id:
type: integer
price:
type: number
profileChecked:
price_change_percentage:
type: number
profile_checked:
type: boolean
supply:
type: integer
twitterPfpUrl:
twitter_pfp_url:
type: string
twitterUsername:
twitter_username:
type: string
updatedAt:
updated_at:
type: string
type: object
response.FriendTechKeyWatchlistItemRespose:
response.FriendTechKeyWatchlistItemResponse:
properties:
created_at:
type: string
Expand Down Expand Up @@ -2660,14 +2664,14 @@ definitions:
type: string
usd:
type: number
usd_14d_change:
type: number
usd_1h_change:
type: number
usd_1y_change:
type: number
usd_7d_change:
type: number
usd_14d_change:
type: number
usd_24h_change:
type: number
usd_24h_vol:
Expand Down Expand Up @@ -3288,6 +3292,12 @@ definitions:
additionalProperties:
type: number
type: object
price_change_percentage_7d:
type: number
price_change_percentage_7d_in_currency:
additionalProperties:
type: number
type: object
price_change_percentage_14d:
type: number
price_change_percentage_14d_in_currency:
Expand All @@ -3306,12 +3316,6 @@ definitions:
additionalProperties:
type: number
type: object
price_change_percentage_7d:
type: number
price_change_percentage_7d_in_currency:
additionalProperties:
type: number
type: object
price_change_percentage_24h:
type: number
price_change_percentage_24h_in_currency:
Expand Down Expand Up @@ -3919,7 +3923,7 @@ definitions:
response.TrackFriendTechKeyResponse:
properties:
data:
$ref: '#/definitions/response.FriendTechKeyWatchlistItemRespose'
$ref: '#/definitions/response.FriendTechKeyWatchlistItemResponse'
type: object
response.TransferTokenV2Data:
properties:
Expand Down
12 changes: 6 additions & 6 deletions pkg/response/friend_tech.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ type FriendTechKeysResponse struct {

type FriendTechKey struct {
ID int64 `json:"id"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
Address string `json:"address"`
TwitterUsername string `json:"twitterUsername"`
TwitterPfpUrl string `json:"twitterPfpUrl"`
ProfileChecked bool `json:"profileChecked"`
TwitterUsername string `json:"twitter_username"`
TwitterPfpUrl string `json:"twitter_pfp_url"`
ProfileChecked bool `json:"profile_checked"`
Price float64 `json:"price"`
Supply int `json:"supply"`
Holders int `json:"holders"`
PriceChangePercentage float64 `json:"priceChangePercentage"`
PriceChangePercentage float64 `json:"price_change_percentage"`
}

type GetUserFriendTechKeyWatchlistResponse struct {
Expand Down

0 comments on commit 44def76

Please sign in to comment.