Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yusukebe/p5-webservice-pornhub
Perl interface to the Pornhub.com API.
https://github.com/yusukebe/p5-webservice-pornhub
api-client cpan-module perl pornhub
Last synced: 3 months ago
JSON representation
Perl interface to the Pornhub.com API.
- Host: GitHub
- URL: https://github.com/yusukebe/p5-webservice-pornhub
- Owner: yusukebe
- License: other
- Created: 2020-01-19T22:09:23.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-01-20T06:30:17.000Z (almost 5 years ago)
- Last Synced: 2024-10-06T08:19:33.347Z (3 months ago)
- Topics: api-client, cpan-module, perl, pornhub
- Language: Perl
- Homepage: https://metacpan.org/pod/WebService::Pornhub
- Size: 14.6 KB
- Stars: 5
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: Changes
- License: LICENSE
Awesome Lists containing this project
README
# NAME
WebService::Pornhub - Perl interface to the Pornhub.com API.
# SYNOPSIS
use WebService::Pornhub;
my $pornhub = WebService::Pornhub->new;
# Search videos from Pornhub API
my $videos = $pornhub->search(
search => 'hard',
'tags[]' => ['asian', 'young'],
thumbsizes => 'medium',
);
# Response is Array reference, Perl data structures
for my $video (@$videos) {
say $video->{title};
say $video->{url};
}# DESCRIPTION
WebService::Pornhub provides bindings for the Pornhub.com API. This module build with role [WebService::Client](https://metacpan.org/pod/WebService::Client).
# METHODS
## new
my $pornhub = WebService::Pornhub->new(
timeout => 20, # optional, defaults to 10
logger => Log::Fast->new(...), # optinal, defaults to none
log_method => 'DEBUG', # optional, default to 'DEBUG'
);Prameters:
- timeout: (Optional) Integer. Defaults to `10`
- retries: (Optional) Integer. Defaults to `0`
- logger: (Optional) Log module instance, such modules as [Log::Tiny](https://metacpan.org/pod/Log::Tiny), [Log::Fast](https://metacpan.org/pod/Log::Fast), etc.
- log\_method: (Optional) Text. Defaults to `DEBUG`## search
my $videos = $pornhub->search(
search => 'hard',
'tags[]' => ['asian', 'young'],
thumbsizes => 'medium',
);Parameters:
- category: (Optional)
- page: (Optional) Integer
- search: (Optional) Text
- phrase\[\]: (Optional) Array. Used as pornstars filter.
- tags\[\]: (Optional) Array
- ordering: (Optional) Text. Possible values are featured, newest, mostviewed and rating
- period: (Optional) Text. Only works with ordering parameter. Possible values are weekly, monthly, and alltime
- thumbsize: (Required). Possible values are small,medium,large,small\_hd,medium\_hd,large\_hd## get\_video
my $video = $pornhub->get_video(
id => '44bc40f3bc04f65b7a35',
thumbsize => 'medium',
);Parameters:
- id: (Required) Integer
- thumbsize: (Optional) If set, provides additional thumbnails in different formats. Possible values are small,medium,large,small\_hd,medium\_hd,large\_hd## get\_embed\_code
my $embed = $pornhub->get_embed_code(
id => '44bc40f3bc04f65b7a35',
);Parameters:
- id: (Required) Integer
## get\_deleted\_videos
my $videos = $pornhub->get_deleted_videos(
page => 3,
);Parameters:
- page: (Required) Integer
## is\_video\_active
my $active = $pornhub->is_video_active(
is => '44bc40f3bc04f65b7a35',
);Parameters:
- id: (Required) Integer
## get\_categories
my $categories = $pornhub->get_categories();
There are no parameters for this method.
## get\_tags
my $tags = $pornhub->get_tags(
list => 'a',
);Parameters:
- list: a-z for tag starting letter, 0 for other.
## get\_stars
my $stars = $pornhub->get_stars();
There are no parameters for this method.
## get\_stars\_detailed
my $stars = $pornhub->get_stars_detailed();
There are no parameters for this method.
# SEE ALSO
- [WebService::Client](https://metacpan.org/pod/WebService::Client)
- [pornhub-api - npm](https://www.npmjs.com/package/pornhub-api)# LICENSE
Copyright (C) Yusuke Wada.
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.# AUTHOR
Yusuke Wada