The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

WebService::Nestoria::Search::MetadataResponse - Container object for the result of a metadata query to the Nestoria Search API.

VERSION

version 1.022009

This package is used by WebService::Nestoria::Search and a WebService::Nestoria::Search::MetadataResponse object should never need to be explicitly created by the user.

Functions

get_hashref

Returns a reference to a hash that contains exactly what the response from the Nestoria API gave, converted from JSON into a hashref with JSON::from_json()

get_metadata

Returns a reference to a hash that maps metadata names to the statistics associated with it.

get_average_price

Returns the average for properties which match the number of rooms or bedrooms (come countries use rooms, some countries bedrooms), property type and listing type, for the given month.

    my %options = (
        # required
        listing_type => 'rent',
        range => 'monthly',             # 'monthly' ('quarterly' is deprecated, and has no data.)
        
        # optional depending on 'range'
        year => 2007,                   # 4 digit date
        month => 'January',             # eg. '1', 'Jan' or 'January'

        # optional
        num_beds  => 3,                 # integer
        num_rooms => 2,                 # integer 
        per_sqm   => 1,                 # price returned per square metre
    );
    my $average_price = $metadata->get_average_price(%options);

Rent prices are monthly. Prices are in local currency (EUR, GBP, INR, etc) See http://www.nestoria.co.uk/help/api-metadata to see from when data is available for each country

If year and month are not supplied data for the most recent month available will be returned.

get_num_datapoints

Called the same way as get_average_price, but instead returns the number of datapoints used to calculate the average.

Copyright

Copyright (C) 2014 Lokku Ltd.

Author

Alex Balhatchet (alex@lokku.com)

Patches supplied by Yoav Felberbaum, Alistair Francis, Ed Freyfogle.