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

API get multiple days ( or next event ) #144

Open
k9t9 opened this issue Oct 17, 2019 · 4 comments
Open

API get multiple days ( or next event ) #144

k9t9 opened this issue Oct 17, 2019 · 4 comments

Comments

@k9t9
Copy link

k9t9 commented Oct 17, 2019

First of all I must say this is a very impressive project.
regarding the API that is available at : https://wyrezmanim.herokuapp.com/api/zmanim

Is there a method to query multiple days from the API ?
In short - and for practical implementation of events or calendars - how can one get the NEXT Holiday for example or the NEXT Shabat or Yom Tov ?
The only method I can think of now is to do a query every day and then check the result - and if there is no "Parasha" or other name then query the next day and so on ..

Also - regarding that - is there a method in the API to get the NAMES of the days ( like for example are presented in the excel sheet exported from https://kosherjava.com/zmanim-project/zmanim-calendar-generator/

@KosherJava
Copy link
Owner

@k9t9 ,
the https://wyrezmanim.herokuapp.com/api/zmanim is not my project, but I emailed the developer who provided it a link to this issue. As far as the day names, those are part of the formatting code at https://github.com/KosherJava/zmanim/blob/master/src/net/sourceforge/zmanim/hebrewcalendar/HebrewDateFormatter.java , but again, I can't answer for the web API that is not mine on providing this in their API.

@KosherJava
Copy link
Owner

Adding @greatjack1 to the thread.

@greatjack1
Copy link
Contributor

greatjack1 commented Oct 17, 2019

Author of the above-referenced service here,

No there is no date range capability yet, but I will add it to the todo as I think its a good idea.

So in short, currently there is no better way to determine the next shabbos or Yom Tov other than to query each upcoming day

@k9t9
Copy link
Author

k9t9 commented Oct 17, 2019

@KosherJava , @greatjack1
Thanks for the super-fast reply.
I wanted to implement this in some kind of a "next-event-countdown" and calendar wp plugin for Jewish events that i am doing now for some website, but I intent to released the repo publicly,.
For now I will implement the multiple query way.. ( or just use the php library to draw Parashot and Shabat)

Thanks again. I will post the repo link when it's done..

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

3 participants