Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Searching trend with max #7

Closed
sigjak opened this issue Apr 19, 2021 · 4 comments
Closed

Searching trend with max #7

sigjak opened this issue Apr 19, 2021 · 4 comments

Comments

@sigjak
Copy link

sigjak commented Apr 19, 2021

Searching in trending using;
'https://api.podcastindex.org/api/1.0/podcasts/trending?max=10'
results in an error. Am I misunderstanding the docs?
Could be a problem with the int value:
Unhandled Exception: type 'String' is not a subtype of type 'int?'

All the best

Sig

@daveajones
Copy link
Contributor

Where is that error message coming from? Your code? That doesn’t look like an error the index would return.

@sigjak
Copy link
Author

sigjak commented Apr 19, 2021

Without max=10 in the query string it works fine and I get what seems to be the default of 40. Including lang=en or since= some number also works, but with max=10 (or any number) this is the entire error message:

Launching lib\main.dart on sdk gphone x86 arm in debug mode...
lib\main.dart:1
√ Built build\app\outputs\flutter-apk\app-debug.apk.
Connecting to VM Service at ws://127.0.0.1:57848/9fqZmluwIW0=/ws
I/xample.trendin(11574): Waiting for a blocking GC ProfileSaver
E/flutter (11574): [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: type 'String' is not a subtype of type 'int?'
E/flutter (11574): #0 new Trending.fromJson
package:trending/models/trend_model.dart:32
E/flutter (11574): #1 trendingFromJson
package:trending/models/trend_model.dart:7
E/flutter (11574): #2 TrendingService.getTrends
package:trending/screens/trending_service.dart:46
E/flutter (11574):
E/flutter (11574): #3 _HomeState.initState. (package:trending/screens/home_screen.dart)
package:trending/screens/home_screen.dart:1
E/flutter (11574):
E/flutter (11574):

@daveajones
Copy link
Contributor

Try it now.

@sigjak
Copy link
Author

sigjak commented Apr 19, 2021

Fabulous! Thanks for a swift reply and thanks and congratulations on a great db!

@sigjak sigjak closed this as completed Apr 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants