prajjwaldimri/Genius.NET

Jil.DeserializationException: Expected digit when requesting not existing page with ArtistClient.GetArtistsSongs method

Closed this issue · 6 comments

When I try to request an invalid page, using, for example, that piece of code:

GeniusClient _geniusClient;
var songs = await _geniusClient.ArtistClient.GetArtistsSongs(16775, sort: "title", perPage: "10", page: "3000");

I'm getting this error:
Jil.DeserializationException: Expected digit

I fixed the error by myself.
You have to make the NextPage property in ArtistsSongsData nullable:

[JilDirective(Name = "next_page")] public ulong? NextPage { get; set; }

I cannot open a pull request since I don't have the write permissions. If you can give me the permission I will open the PR adding also some unit tests.

Hey @OmarPani93.I think you can open a PR without having write access to this repository. I will merge it when you are done.

Hi @prajjwaldimri, I tried to create a new branch from master but I can't push it. Do you want me to use another branch instead?

You won't be able to push directly to the repo as is convention in open source projects.
So, to contribute, you would need to first fork this repo and then push your changes to that fork and then create a pull request here.

Ok, thank you, I will try that. Sorry but this is actually my first time using GitHub contributing on some project.

Hey, no worries :) You can see this link on how to create a PR: https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request.

Feel free to comment here if you have any other queries.