GithubHelp home page GithubHelp logo

Dropping inventory items about poke-api HOT 6 CLOSED

coalwater avatar coalwater commented on September 8, 2024
Dropping inventory items

from poke-api.

Comments (6)

nabeelamjad avatar nabeelamjad commented on September 8, 2024

It seems like neither RecycleInventoryItemRequest nor response is in rpc_sub.rb. I suspect the Proto files need to be updated, I'll need to have a look at this some point upcoming weekend (they all need updating to the new structure).

However, If you really want to get this working I've published a branch with this call working for you: https://github.com/nabeelamjad/poke-api/tree/RecycleInventory (you can run gem build poke-api.gemspec && gem install poke-api-0.0.2.gem to override your gem once you checkout/download that git branch, alternatively point Bundler at the branch instead).

The way you would invoke this is client.recycle_inventory_item(item_id: 201, count: 10) followed with client.call.

from poke-api.

coalwater avatar coalwater commented on September 8, 2024

Ok thank you very much, will test and update you.
if you need help with your api I could give you some of my time, the problem is that I don't really understand how this protos part works, maybe if you could guide me to something to give me the basics to start.

from poke-api.

nabeelamjad avatar nabeelamjad commented on September 8, 2024

Have a look at this link: https://github.com/AeonLucid/POGOProtos/search?utf8=%E2%9C%93&q=recycle. I've gotten the proto files from there and simply added them to the existing structure (not too difficult, have a look at my commit). To generate proto files all you need to do is run the protoc command targeting the .proto files/directory. https://developers.google.com/protocol-buffers/docs/reference/ruby-generated goes into more detail about it, from there on you can simply use them by requiring the files and invoking the classes.

You will need to have protoc installed, instructions here: https://github.com/google/protobuf/blob/master/src/README.md.

from poke-api.

Icehawk78 avatar Icehawk78 commented on September 8, 2024

Is there a reason you don't/can't just compile the entirety of the POGOProtos and drop them in here?

Would the existing structure support doing that, or would that be a very large change, given that the proto files seem to be somewhat regularly being updated?

from poke-api.

nabeelamjad avatar nabeelamjad commented on September 8, 2024

Compiling the protos is quite straight forward, I would need to make sure the existing structure still works with the new protos (it'll be a case of making sure all the class names match, etc)

from poke-api.

nabeelamjad avatar nabeelamjad commented on September 8, 2024

@Icehawk78 @coalwater - New protobufs are now up and running, let me know if there are any issues.

I've tagged it as 0.0.3, if something does not work then revert to 0.0.2 and let me know. I've had to use b2c48b17b560dc3d259d50a8afa1ef4199170bc4 @ POGOProtos while also adding a missing import on GetIncensePokemonResponse.proto. I will use the very latest protobufs once that repository has been fixed (there's quite some stuff broken now apparently). We're only a couple commits behind however, so everything should be good.

from poke-api.

Related Issues (20)

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.