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

org.json.JSONException: No value for date #2

Closed
hanynigma opened this issue Dec 22, 2019 · 3 comments
Closed

org.json.JSONException: No value for date #2

hanynigma opened this issue Dec 22, 2019 · 3 comments
Assignees

Comments

@hanynigma
Copy link

hanynigma commented Dec 22, 2019

when i change date to any other than TODAY
throws this Exception

org.json.JSONException: No value for date

`case R.id.layoutAries:
                    System.out.println("here is the aries 01");
                    Horoscope hAries = new Horoscope.Zodiac(MainActivity.this)
                            .requestSunSign(SUNSIGN.ARIES)
                            .requestDuration(DURATION.TOMORROW)
                            .showLoader(true)
                            .isDebuggable(true)
                            .fetchHoroscope();


                    HorologyController cAries = new HorologyController(new Response() {
                        @Override
                        public void onResponseObtained(Zodiac zodiac) {
                            showHoroscopeDialog(zodiac, true, "");

                        }

                        @Override
                        public void onErrorObtained(String errormsg) {
                            showHoroscopeDialog(null, false, errormsg);

                        }
                    });
                    cAries.requestConstellations(hAries);
                    break;`
@fab16b
Copy link

fab16b commented Dec 23, 2019

I had the same issue too. I want to change to requestDuration(DURATION.WEEK) or MONTH/YEAR, but it throws the same error: org.json.JSONException: No value for date.

It works only when it is requestDuration(DURATION.TODAY).

Please help.

   System.out.println("here is the aries 01");
                Horoscope hAquarius = new Horoscope.Zodiac(AquariusActivity.this)
                        .showLoader(false)
                        .requestSunSign(SUNSIGN.AQUARIUS).requestDuration(DURATION.WEEK).isDebuggable(true).fetchHoroscope();
                HorologyController cAries = new HorologyController(new Response() {
                    @Override
                    public void onResponseObtained(Zodiac zodiac) {
                        System.out.println("here is the aries 02");
                        showHoroscope(zodiac, true, "");
                    }

                    @Override
                    public void onErrorObtained(String errormsg) {
                        System.out.println("here is the aries 03");
                        showHoroscope(null, false, errormsg);
                    }
                });
                cAries.requestConstellations(hAquarius);

@TheBotBox TheBotBox self-assigned this Jan 12, 2020
@TheBotBox
Copy link
Owner

I have removed DURATION.TOMORROW from the API. It was a mistake from my side.
Rest all is working fine now.

@hanynigma
Copy link
Author

it is working now

all Duration work

thanks

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