Skip to content

Instantly share code, notes, and snippets.

@yusukebe
Created January 19, 2020 02:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yusukebe/1df00af4d77873a055e8fe63aad8e524 to your computer and use it in GitHub Desktop.
Save yusukebe/1df00af4d77873a055e8fe63aad8e524 to your computer and use it in GitHub Desktop.
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