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

fetchSchedule is not working in Zoro #647

Closed
RMahammad opened this issue Jan 16, 2025 · 2 comments
Closed

fetchSchedule is not working in Zoro #647

RMahammad opened this issue Jan 16, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@RMahammad
Copy link

RMahammad commented Jan 16, 2025

Describe the bug

fetchSchedule is not working in Zoro

Steps to reproduce

I just want to get scheduled animes in the month, but it returns me undefined. I pasted my code below

export const getScheduledAnime = async ( date: string ): Promise<ISearch<IAnimeResult>> => {
  try {
    console.log(date);
    const data = await zoro.fetchSchedule("2025-15-1");

    console.log("This is data: ", data);
    return data;
  } catch (error) {
    console.log(error);
    throw error;
  }
};

Expected behavior

I should to see scheduled animes but couldn't see

Example:

  results: [
    {
      id: 'high-card-season-2-18820',
      title: 'High Card Season 2',
      japaneseTitle: 'High Card Season 2',
      url: 'https://hianime.to/high-card-season-2-18820',
      airingEpisode: 'Episode 10',
      airingTime: '07:30'
    },
    {
      id: 'tsukimichi-moonlit-fantasy-season-2-18877',
      title: 'Tsukimichi -Moonlit Fantasy- Season 2',
      japaneseTitle: 'Tsuki ga Michibiku Isekai Douchuu 2nd Season',
      url: 'https://hianime.to/tsukimichi-moonlit-fantasy-season-2-18877',
      airingEpisode: 'Episode 10',
      airingTime: '09:00'
    },
  ]
}

Actual behavior

I get something like that, does this API not working or did I do something wrong ?

  results: [
    {
      id: undefined,
      title: '',
      japaneseTitle: undefined,
      url: 'https://hianime.to/undefined',
      airingEpisode: '',
      airingTime: ''
    }
  ]
}

Additional context

No response

@RMahammad RMahammad added the bug Something isn't working label Jan 16, 2025
@Shikiiii
Copy link

Shikiiii commented Jan 16, 2025

Hey @RMahammad, the date format should be YYYY-MM-DD.
In your example, it should be 2025-01-15 not 2025-15-1.
You can learn more in the documentation.

@RMahammad
Copy link
Author

Hey @RMahammad, the date format should be YYYY-MM-DD. In your example, it should be 2025-01-15 not 2025-15-1.

Omg problem was that I forgot to add 01, I tested both format like yyyy-mm-dd and yyyy-dd-mm, but I was passing 1 instead of 01, thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants