Code Monkey home page Code Monkey logo

igdb-api-jvm's People

Contributors

berkos avatar husnjak avatar lephyrius avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

igdb-api-jvm's Issues

RequestException

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"

IGDBWrapper cannot be resolved to a type (Java/Eclipse)

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.

RequestException

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
}
"""

.getCover().getImageId() returns nothing

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);
"""

Compile failure when used with Firebase Firestore

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:

  • Upgrade protobuf usage to play nice with firestore
  • separate json and protobuf into optional packages so we import igdb-core and igdb-json or igdb-proto

Steps to repro:

  1. create a project, import firebase bom and firestore
  2. Import this IGDB wrapper (1.1.0)

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

Wrapper incompatible with Android

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

  • find alternative protobuf library that does not use the org.eclipse.sisu:org.eclipse.sisu.inject:0.0.0.M5.jar
  • Create a new library without generated classes.

Cannot resolve IGDBWrapper

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'.

Couldn't download library

When I add this dependency:

<dependency>
  <groupId>io.github.husnjak</groupId>
  <artifactId>igdb-api-jvm</artifactId>
  <version>1.0.10</version>
</dependency>

I get this error in IntelliJ:

2023-03-12_14-46

Missing artifact fuel-android

When adding to project through maven Pom file, an error is thrown stating "Missing artifact com.GitHub.kittinunf.fuel-android:jar:2.3.1"

Protobuff versions mismatch

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

Release as JAR

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 ;) ).

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.