husnjak / igdb-api-jvm Goto Github PK
View Code? Open in Web Editor NEWWrapper for IGDBs API written in Kotlin should work for all JVM based languages, tested in Kotlin & Java
License: MIT License
Wrapper for IGDBs API written in Kotlin should work for all JVM based languages, tested in Kotlin & Java
License: MIT License
Hey,
I always get a RequestError when using the template from the Wiki.
https://hasteb.in/onimahey.gradle (I replaced my key, so it's not public, obviously.)
Status code 403.
Why?
Hi,
I tried implement the Java code as shown in README, but the following exception is thrown:
com.api.igdb.exceptions.RequestException at com.api.igdb.request.IGDBWrapper.apiJsonRequest(IGDBWrapper.kt:60)
When I use the getStatusCode method it returns "403"
Hi there
First of all thanks for the all the work to build this wrapper. I wanted to use it in a Java project of mine but came across a problem. I added the dependeny as stated in the instructions. It was downloaded and is shown in the Maven Dependencies, however I am unable to access the IGDBWrapper class.
The error reads: IGDBWrapper cannot be resolved to a type (and the suggested actions do not include importing the package which would be expected).
Upon further investigation it appears that the reason for this is that these classes are located in the (default package) which apparantly is inaccessible from outside that package.
hello brother I think I follow all the steps but I just cant get it to work
I enter the CLIENT_ID and ACCESS_TOKEN but ill always catch RequestException
and i get this the run console : Skipped 34 frames! The application may be doing too much work on its main thread.
CODE :
"""
IGDBWrapper wrapper = IGDBWrapper.INSTANCE;
wrapper.setCredentials("CLIENT_ID", "ACCESS_TOKEN")
APICalypse apicalypse = new APICalypse().fields("*").sort("release_dates.date", Sort.DESCENDING);
try{
List games = ProtoRequestKt.games(wrapper, apicalypse);
} catch(RequestException e) {
// Do something or error
}
"""
I want to build the image id dynamically but "getImageId" doesnt return anything
"""
String image_id = "mnljdjtrh44x4snmierh";
String image_id2 = task.get().get(0).getCover().getImageId();
String imageURL = ImageBuilderKt.imageBuilder(image_id2, ImageSize.SCREENSHOT_MEDIUM, ImageType.PNG);
"""
I see there is an issue when you combine this library with firebase (bom 31.5.0 but happens with various newer/older versions of firebase bom).
This library uses protobuf (whether you use it or not) and firebase uses protobuf too. But quite some time ago they made changes to use protobuf-javalite (I think). In any case you cannot mix protobuf-java with protobuf-javalite hence the compile error when merging dependencies.
I'm not using the protobuf parts of this wrapper but this library depends on it.
Here are the posts describing the issue
Suggestions:
Steps to repro:
Build and observe compile errors (there are two)
> Task :app:mergeDebugJavaResource FAILED
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
......
(See attached for full logs of the above... it's a lot!) log_1.txt
2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:mergeDebugJavaResource'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.MergeJavaResWorkAction
> 2 files found with path 'google/protobuf/field_mask.proto' from inputs:
- /Users/username/.gradle/caches/modules-2/files-2.1/com.google.protobuf/protobuf-java/3.24.3/8e0f08a59c21e3f17121667489a005a8df091af0/protobuf-java-3.24.3.jar
- /Users/username/.gradle/caches/modules-2/files-2.1/com.google.protobuf/protobuf-javalite/3.21.7/82b692be08383107fd1c6d44474b56df411edd27/protobuf-javalite-3.21.7.jar
There is an issue when adding the wrapper to an Android project as an dependency where we are met with the error:
> Annotation processors must be explicitly declared now. The following dependencies on the compile classpath are found to contain annotation processor. Please add them to the annotationProcessor configuration.
- org.eclipse.sisu.inject-0.0.0.M5.jar (org.eclipse.sisu:org.eclipse.sisu.inject:0.0.0.M5)
Alternatively, set android.defaultConfig.javaCompileOptions.annotationProcessorOptions.includeCompileClasspath = true to continue with previous behavior. Note that this option is deprecated and will be removed in the future.
See https://developer.android.com/r/tools/annotation-processor-error-message.html for more details.
Debugging the issue leads to Googles Protocol buffers which are used to build the generated classes for the API.
Solutions
Hi,
i add all in my gradle but when i call this:
IGDBWrapper wrapper = IGDBWrapper.INSTANCE;
wrapper.setUserkey("YOUR_API_KEY");
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
implementation 'com.github.husnjak:IGDB-API-JVM:0.2'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
allprojects {
repositories {
google()
jcenter()
maven { url 'https://jitpack.io' }
}
`}`
i got this error 'cannot resolve symbol IGDBWrapper'.
When adding to project through maven Pom file, an error is thrown stating "Missing artifact com.GitHub.kittinunf.fuel-android:jar:2.3.1"
Hi there. Looks like last version has protobuf version mismatch. If you try to create simple class it will not compile showing compilation error
java: cannot access com.google.protobuf.CodedInputStream class file for com.google.protobuf.CodedInputStream not found
In your build.gradle.kts
file you are using
implementation("com.google.protobuf:protobuf-java:3.11.0")
but
artifact = "com.google.protobuf:protoc:3.13.0"
and this version mismatch is causing compilation error
However, if you explicitly configure maven or graddle to use protobuf-java 3.13.0 the error goes away.
Hopefully this will help to fix this error
Hey,
I always get a RequestError when using the template from the Wiki.
https://hasteb.in/onimahey.gradle
Status code 403.
Why?
It would be quite cool if there was a drop-in-project JAR with all the dependencies included to easily start playing around.
Or just for people who do not use Maven or Gradle (they still exist ;) ).
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.