thebotbox / horoscope-api Goto Github PK
View Code? Open in Web Editor NEWHoroscope API for android to get the horoscope according to the sunsign
Horoscope API for android to get the horoscope according to the sunsign
when i'm using this in my app this is showing fetching and keeps on loading and doesn't show any data
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'])
}
The data is not displayed in android version 11
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
[]
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)
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;`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.