Skip to content

Commit

Permalink
add new fields and filters for rpc apps
Browse files Browse the repository at this point in the history
  • Loading branch information
LimJongDuk committed Sep 25, 2024
1 parent 347a497 commit 9afd137
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions scrapper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ func checkApp(app *App) error {
errs = append(errs, fmt.Errorf("score not parsed"))
}

if app.Released == "" {
errs = append(errs, fmt.Errorf("released not parsed"))
}

return multierr.Combine(errs...)
}

Expand Down Expand Up @@ -254,3 +258,23 @@ func Test_Scraper(t *testing.T) {
}
})
}

func Test(t *testing.T) {
appID := "com.miniclip.plagueinc"

collector := New()

app, err := collector.App(context.Background(), ApplicationSpec{
AppID: appID,
})
if err != nil {
t.Fatal(err)
}

if err := checkApp(&app); err != nil {
t.Fatal(err)
}

t.Log(app.Released)
t.Log(app.ContentRating)
}

0 comments on commit 9afd137

Please sign in to comment.