google-wallet / rest-samples

Samples for the Google Wallet REST APIs
https://developers.google.com/wallet/
Apache License 2.0
277 stars 119 forks source link

Walletobjects api service not on Maven? #75

Open dbhathena opened 1 year ago

dbhathena commented 1 year ago

I am looking to implement the Google Wallet API in Java, and have been following the instructions here. However I noticed that the google-api-services-walletobjects artifact is not in Maven, and is only available as a jar download here, and is also not made available within the Google API Java Client. Why is this, and can it be added to Maven so my project can access the artifact without having to download and install the jar locally? Thanks!

pfaffenrodt commented 10 months ago

@dbhathena Do you use the jar file? I guess I will build my own pojos.

Updates of Jar files are hard to keep track of. Please explain the reason?

dbhathena commented 10 months ago

@pfaffenrodt I downloaded the jar file and have been using that so far, which works fine but is unideal.

razvanphp commented 10 months ago

~Same thing for PHP, why can't those libs be properly open-sourced in a git repo? For php, added to composer also... Thanks!~

I stand corrected...by myself. For PHP, one can (and should!) install the libs using composer:

{
// ...
  "require": {
    "php": ">=7.4",
    "google/apiclient": "^2.15.0"
  },
  "scripts": {
    "pre-autoload-dump": "Google\\Task\\Composer::cleanup"
  },
  "extra": {
    "google/apiclient-services": [
      "Walletobjects"
    ]
  }
}

... this will also install composer package google/apiclient-services as dependency. Source

Then the Walletobjects class is available in namespace Google\Service\Walletobjects.

I will update this repo with a MR for this.

razvanphp commented 8 months ago

@dbhathena the same seems to be true for Java: https://github.com/googleapis/google-api-java-client-services/tree/main/clients/google-api-services-walletobjects/v1