Created
January 19, 2020 02:35
-
-
Save yusukebe/1df00af4d77873a055e8fe63aad8e524 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v5.20; | |
use strict; | |
use warnings; | |
package WebService::Pornhub { | |
use Moo; | |
use Function::Parameters; | |
with 'WebService::Client'; | |
has '+base_url' => ( default => 'http://www.pornhub.com/webmasters' ); | |
method get_stars() { | |
return $self->get('/stars'); | |
} | |
}; | |
my $c = WebService::Pornhub->new(); | |
my $r = $c->get_stars(); | |
for my $s (@{$r->{stars}}) { | |
say $s->{star}{star_name}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment