Yelp/Review.pm

filter: Statementstmt 100% 9 / 9 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 100% 12 / 12 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Yelp/Result.pm ↑ Summary
1 package WebService::Yelp::Review;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 ▶use base qw/Class::Accessor/;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 __PACKAGE__->mk_ro_accessors(qw/user_photo_url_small rating_img_url_small
8 user_url rating_img_url user_name rating url
9 text_excerpt user_photo_url id/);
10  
11  
12 =head1 NAME
13  
14 WebService::Yelp::Neighborhood - Yelp.com API Review Class
15  
16 =head1 SYNOPSIS
17  
18 use strict;
19 use WebService::Yelp;
20  
21 my $yelp = WebService::Yelp->new({ywsid => 'XXXXXXXXXXXX'});
22  
23 my $biz_res = $yelp->search_review_hood({
24 term => 'cream puffs',
25 location => 'San Francisco',
26 };
27 for my $b (@{$biz_res->businesses()}) {
28 for my $r (@{$b->reviews()}) {
29 print $b->name . " is rated " . $r->rating . " by user "
30 $r->user_name . "\n";
31 }
32 }
33  
34 =head1 DESCRIPTION
35  
36 This class represents a single review of a business on Yelp.
37  
38 =head1 METHODS (Read Only)
39  
40 =head2 id
41  
42 This review's id.
43  
44 =head2 rating
45  
46 The numeric rating for this review.
47  
48 =head2 rating_img_url
49  
50 The URL of the stars for this rating. (84x17 pixels)
51  
52 =head2 rating_img_url_small
53  
54 The URL of the stars for this rating (only smaller). (50x10 pixels)
55  
56 =head2 url
57  
58 The url of this review.
59  
60 =head2 text_excerpt
61  
62 A text excerpt of the review.
63  
64 =head2 user_name
65  
66 The user name of the reviewer.
67  
68 =head2 user_url
69  
70 The user's profile URL.
71  
72 =head2 user_photo_url
73  
74 The user's photo URL. (100x100 pixels)
75  
76 =head2 user_photo_url_small
77  
78 The user's small photo URL. (40x40 pixels)
79  
80 =cut
81  
82 1;
« Yelp/Result.pm ↑ Summary