I went trough the the shopifyApi documentation and it’s explaining how to communicate with the API via post/put/get http verbs.
I am coding in Ruby and I was wondering where I could find a list of all the methods available (like product.add_metafield(params)).
I checked the gem server and didn’t find any RDOC available for the api.
Thank you
Here is a neat trick. At your command-line try gem which shopify_api. That will list out the current version you are using for your current Ruby. Of course with RVM or RBEnv these vary wildly.
Copy and paste the result to your clipboard. An example from my CLI is:
You only need this part…
With that in your clipboard, type subl or mate or vim or whatever your text editor is and paste in that path. You’ll then have the gem at your disposal. If you navigate to the shopify_api/resources folder you’ll see the product.rb file, showing off some methods you can use. You can see how most resources work this way. Learning Active Resource can also go a long way to showing off how the API gem provides functionality.
You can hack the gem once you get past this stage of exploration. You can re-open the modules and classes and add your own methods. Pretty neat stuff.
The command line interface based on Thor is also in there, and worth a good look. That is one of the coolest aspects of the gem in my opinion. see shopify_api/cli.rb