k?
my $cb = ref $_[-1] eq 'CODE' ? pop : undef;
$res->$cb if $cb;
my @mods = @{$res->json->{data}{children}};
# FIXME should we return User objects instead? or combined?
my @coll
my $pkg = 'Mojo::Snoo::Subreddit::About::' . $self->name;
$self->_monkey_patch($pkg, $res->json->{data});
}
sub _toggle_subscribe {
my ($self, $action) = @_;
# Calling $self->about fe
ams->{title} //= $title // '';
$params->{sr} = $self->name;
$params->{api_type} = 'json';
$params->{kind} = $kind;
my $res = $self->_do_request('POST', '/api/submit', %$par
my ($captcha_id, $captcha_text) = $self->_solve_captcha();
my %form = (
api_type => 'json',
captcha => $captcha_text,
iden => $captcha_id,
subject => 'subjec
.com/api/v1/access_token';
my $res = $self->agent->post($access_url => form => \%form)->res->json;
# if a problem arises, it is most likely due to given auth being incorrect
# let the us
my $captcha = $self->_do_request('POST', '/api/new_captcha', api_type => 'json');
my $captcha_id = $captcha->{json}{data}{iden};
my $url = "http://www.reddit.com/captcha/$captcha_id.png";
} = 'bearer ' . $self->access_token;
}
my $url = $self->base_url;
$url->path("$path.json");
if ($method eq 'GET') {
$url->query(%params) if %params;
return $self->ag
map { $_->{kind} eq 't1' ? $_->{data} : () }
map { @{$_->{data}{children}} } @{$res->json};
my %args = map { $_ => $self->$_ } (
qw(
username
password