Skip to content

Commit

Permalink
last_update string -> int64 변경 대응
Browse files Browse the repository at this point in the history
  • Loading branch information
thftgr committed Oct 9, 2023
1 parent 618f0e3 commit 9818337
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
14 changes: 7 additions & 7 deletions banchoCrawler/getBeatmapDataFromBancho.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func ManualUpdateBeatmapSet(id int) {
var err error
defer func() {
if err != nil {
pterm.Error.Println(err)
pterm.Error.WithShowLineNumber().Println(err)
}
}()
url := fmt.Sprintf("https://osu.ppy.sh/api/v2/beatmapsets/search?nsfw=true&s=any&q=%d", id)
Expand All @@ -121,7 +121,7 @@ func getUpdatedMapRanked() {
var err error
defer func() {
if err != nil {
pterm.Error.Println(err)
pterm.Error.WithShowLineNumber().Println(err)
}
}()
url := "https://osu.ppy.sh/api/v2/beatmapsets/search?nsfw=true&s=ranked"
Expand All @@ -144,7 +144,7 @@ func getUpdatedMapLoved() {
var err error
defer func() {
if err != nil {
pterm.Error.Println(err)
pterm.Error.WithShowLineNumber().Println(err)
}
}()
url := "https://osu.ppy.sh/api/v2/beatmapsets/search?nsfw=true&s=loved"
Expand All @@ -163,7 +163,7 @@ func getUpdatedMapQualified() {
var err error
defer func() {
if err != nil {
pterm.Error.Println(err)
pterm.Error.WithShowLineNumber().Println(err)
}
}()
url := "https://osu.ppy.sh/api/v2/beatmapsets/search?nsfw=true&s=qualified"
Expand All @@ -183,7 +183,7 @@ func getGraveyardMap() {
var err error
defer func() {
if err != nil {
pterm.Error.Println(err)
pterm.Error.WithShowLineNumber().Println(err)
}
}()
url := ""
Expand Down Expand Up @@ -215,7 +215,7 @@ func getUpdatedMapDesc() {
var err error
defer func() {
if err != nil {
pterm.Error.Println(err)
pterm.Error.WithShowLineNumber().Println(err)
}
}()
url := "https://osu.ppy.sh/api/v2/beatmapsets/search?nsfw=true&sort=updated_desc&s=any"
Expand All @@ -241,7 +241,7 @@ func getUpdatedMapAsc() {
var err error
defer func() {
if err != nil {
pterm.Error.Println(err)
pterm.Error.WithShowLineNumber().Println(err)
}
}()
url := ""
Expand Down
10 changes: 5 additions & 5 deletions osu/apiSrtuct.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ package osu

type BeatmapsetsSearch struct {
Beatmapsets *[]BeatmapSetsIN `json:"beatmapsets"`
Search *struct {
Search *struct {
Sort *string `json:"sort"`
} `json:"search"`
Cursor *struct {
LastUpdate *string `json:"last_update"`
Id *string `json:"_id"`
} `json:"cursor"`
//Cursor *struct {
// LastUpdate *int64 `json:"last_update"`
// Id *string `json:"_id"`
//} `json:"cursor"`

CursorString string `json:"cursor_string"`

Expand Down

0 comments on commit 9818337

Please sign in to comment.