Willem Basson > WebService-Tesco-API > WebService::Tesco::API

Download:
WebService-Tesco-API-1.110230.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.01   Source  

NAME ^

WebService::Tesco::API - Web service for the Tesco groceries API

VERSION ^

version 1.110230

SYNOPSIS ^

use WebService::Tesco::API;

my $tesco = WebService::Tesco::API->new( app_key => 'xxxxxx', developer_key => 'yyyyyy', debug => 1, );

my $result = $tesco->login({ email => 'test@test.com', password => 'password', });

DESCRIPTION ^

Web service for the Tesco groceries API, currently in beta. Register at: https://secure.techfortesco.com/tescoapiweb/ Terms of use: http://www.techfortesco.com/tescoapiweb/terms.htm

NAME ^

WebService::Tesco::API - Web service for the Tesco groceries API.

VERSION ^

version 1.110210

NAME ^

WebService::Tesco::API - Web service for the Tesco groceries API

VERSION ^

Version 0.01

Constructor ^

new()

Creates and returns a new WebService::Tesco::API object

    my $tesco = WebService::Tesco::API->new(
            app_key         => 'xxxxxx',
            developer_key   => 'yyyyyy',
        );

METHODS ^

get($args)

General method for sending a GET request. Set $args->{secure} to use the https endpoint (required for certain requests). You shouldn't need to use this method directly

login({ email => 'test@test.com', password => 'password' })

Log in to the Tesco Grocery API It uses the https endpoint to send email and password. Returns a session key.

Returns:

{ "StatusCode" => 0, "StatusInfo" => "Command Processed OK", "BranchNumber" => "2431", "CustomerId" => "12592340", "CustomerName" => "Mr Lansley", "SessionKey" => "x38yJTParR282iuQrmvcmgBwLhwhLKJqKj6rcmxYy1WRR4j5me", "ChosenDeliverySlotInfo" => "No delivery slot is reserved." }

session_get( $args )

General method for sending a GET request that requires a session key. You shouldn't need to use this method directly

amend_order({ ordernumber => 1234567 })

Switches the API into ʻAmend Orderʼ Mode

cancel_amend_order()

Cancels any edits to the amended order and returns to the current un-checked-out basket.

change_basket({ productid => 1234567, changequantity => 2, substitution => 'YES', notesforshopper => 'note' })

Enables products to be added to, removed from, and updated in the current basket.

choose_delivery_slot( deliveryslotid => 1234567 })

Selects a delivery slot from a list provided by list_delivery_slots.

latest_app_version()

Returns your app's latest version (set by you in the developer portal).

list_delivery_slots()

Lists available delivery slots.

list_basket({ fast => 'Y' })

Lists the contents of the basket.

list_basket_summary({ includeproducts => 'Y' })

Lists just summary information about the basket.

list_favourites({ page => 1 })

Returns the products in the customerʼs favourites list.

list_pending_orders()

Lists orders that have already been checked-out but not yet delivered.

list_product_categories()

Lists the departments, aisles and shelves in a nested format.

list_product_offers({ page => 1 })

Lists all the products currently on offer.

list_products_by_category({ category => 18, extendedinfo => 'Y' })

Lists the products for a given shelf (provided by list_product_categories).

product_search({ searchtext => 'Turnip', extendedinfo => 'Y' })

Searches for products using text or barcode.

ready_for_checkout()

Checks to see if an order is ready for checkout (that is, there are at least 5 products in the basket and a delivery slot has been selected).

server_date_time()

Returns the serverʼs current date and time.

save_amend_order()

The API is requested to save changes to the amended order.

AUTHOR ^

Willem Basson <willem.basson@gmail.com>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2011 by Willem Basson.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

AUTHOR ^

Willem Basson <willem.basson@gmail.com>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2011 by Willem Basson.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

syntax highlighting: