WWW::Shopify::Public - Main object representing public app access to a particular Shopify store.
Inherits all methods from WWW::Shopify, provides additional mechanisms to modify the used access_token, user-agent and url handler.
Creates a new WWW::Shopify::Public object, which allows you to make calls via the shopify public app interface.
You can see an overview of the authentication workflow for a public app here: http://api.shopify.com/authentication.html
Modifies the requested url by prepending the api key and the password, as well as the shop's url, before sending the request off to the user agent.
Gets/sets the app's access token.
Gets/sets the user agent we're using to access shopify's api. By default we use LWP::UserAgent, with a timeout of 5 seconds.
PLEASE NOTE: At the very least, with LWP::UserAgent, at least, on my system, I had to force the SSL layer of the agent to use SSLv3, using the line
LWP::UserAgent->new( ssl_opts => { SSL_version => 'SSLv3' } );
Otherwise, Shopify does some very weird stuff, and some very weird errors are spit out. Just FYI.
When the shop doesn't have an access_token, this is what you should be redirecting your client to. Inputs should be your scope, as an array, and the url you want to redirect to.
When you have a temporary code, which you should get from authorize_url's redirect and you want to exchange it for a token, you call this.
WWW::Shopify::Item, WWW::Shopify
Adam Harrison (adamdharrison@gmail.com)
See LICENSE in the main directory.
To install WWW::Shopify, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Shopify
CPAN shell
perl -MCPAN -e shell install WWW::Shopify
For more information on module installation, please visit the detailed CPAN module installation guide.