NAME

WWW::Shopify::Public - Main object representing public app access to a particular Shopify store.

DESCRIPTION

Inherits all methods from WWW::Shopify, provides additional mechanisms to modify the used access_token, user-agent and url handler.

METHODS

new($url, $api_key, $access_token)

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

api_key([$api_key])

Gets/sets the app's access token.

access_token([$access_token])

Gets/sets the app's access token.

authorize_url(@$scope, $redirect)

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.

scope_compare(@$scope1, @$scope2)

Determines whether scope1 is more or less permissive than scope2. If the scopes cannot be compared easily (e.g. [write_orders, read_products], [read_products, write_script_tag]), then undef is returned. If scopes can be compared, returns -1, 0 or 1 as appropriate.

refresh_token($new_secret, $refresh_token)

Refreshes a token.

exchange_token($shared_secret, $code)

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.

SEE ALSO

WWW::Shopify::Item, WWW::Shopify

AUTHOR

Adam Harrison (adamdharrison@gmail.com)

LICENSE

See LICENSE in the main directory.