App-bovespa

 view release on metacpan or  search on metacpan

lib/App/bovespa.pm  view on Meta::CPAN


    my $query_params = "?";
    while ( my ( $key, $value ) = each( %url_params ) ) {
        $query_params .=  "$key=" . ( $value ? $value : '' ). "\&";
    }

    my $response = $ua->get( $url . $query_params );

    my $raw_html;
    if ( $response->is_success ){
        $raw_html = $response->decoded_content;
    }else{
        die;
    }

    my $data = decode_json $raw_html;
    return $data->{ query }{ results }{ quote }{ Bid };

}

=head1 NAME



( run in 0.340 second using v1.01-cache-2.11-cpan-26ccb49234f )