Git Product home page Git Product logo

horoscope-api's Issues

not showing data

when i'm using this in my app this is showing fetching and keeps on loading and doesn't show any data

java.io.Exception: ClearText http traffic

I am attempting to use this API as apart of my final project for my android development course. I am running into an issue when requesting horoscopes. Screenshots below. Please get back to me, thanks!
Debug1

Importing does not work

hello,
I am currently trying to use your api to write a simple discord bot, who returns your daily horoscope upon request. My main problem is, that importing your files does not work, and I cant use any of the function calls. Some help how to resolve this issue would be greatly appreciated. thanks in advance:)

my file looks like this

plugins {
id 'java'
}

group 'github.LennoxCode'
version '1.0-SNAPSHOT'

repositories {
maven {
url "https://dl.bintray.com/boxbotbarry/maven"
}
mavenCentral()
jcenter()
}

dependencies {
compile 'org.javacord:javacord:3.0.5'
implementation 'the.bot.box:horoscope-api:1.0.2'
//compile fileTree(dir: 'libs', include: ['*.jar'])
}

Please help

The data is not displayed in android version 11

API SHOWING NULL VALUES

Is the API Dead.
{
"date": "2022-02-04",
"horoscope": "[]",
"sunsign": "Libra"
}
Whilw running the Raw Code Process but not showing any values Except Null as
[]

JSONException

Every thing is working fine until I tried to get Weekly, Monthly or Yearly data its throwing an exception that says No value for date .
My Code is

    Horoscope hGemini = new Horoscope.Zodiac(MainActivity.this)
            .requestSunSign(SUNSIGN.GEMINI)
            .requestDuration(DURATION.WEEK)
            .showLoader(true)
            .isDebuggable(true)
            .fetchHoroscope();
    HorologyController cGemini = new HorologyController(new Response() {
        @Override
        public void onResponseObtained(Zodiac zodiac) {
            String horoscope = zodiac.getHoroscope();
            String sunsign = zodiac.getSunSign();
            String date = zodiac.getDate();
            Log.e("Horoscope", horoscope);
        }

        @Override
        public void onErrorObtained(String errormsg) {
        }
    });
    cGemini.requestConstellations(hGemini);

====>Log message is as bellow

W/System.err: org.json.JSONException: No value for date
W/System.err: at org.json.JSONObject.get(JSONObject.java:392)
at org.json.JSONObject.getString(JSONObject.java:553)
at bot.box.horology.hanshake.HorologyClient$HoroscopeTask.onPostExecute(HorologyClient.java:102)
at bot.box.horology.hanshake.HorologyClient$HoroscopeTask.onPostExecute(HorologyClient.java:41)
at android.os.AsyncTask.finish(AsyncTask.java:695)
at android.os.AsyncTask.access$600(AsyncTask.java:180)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:712)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:226)

org.json.JSONException: No value for date

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;`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.