Imgur-API

 view release on metacpan or  search on metacpan

lib/Imgur/API/Endpoint/Account.pm  view on Meta::CPAN

sub settings {
	my ($this,%p) = @_;

	return $this->dispatcher->request(
		$this->path("3/account/%s/settings",['username'],[],\%p),
		'get',
		\%p
	);
}

sub updateSettings {
	my ($this,%p) = @_;

	return $this->dispatcher->request(
		$this->path("",[],[],\%p),
		'put | post',
		\%p
	);
}

sub profile {

lib/Imgur/API/Endpoint/Album.pm  view on Meta::CPAN

sub upload {
	my ($this,%p) = @_;

	return $this->dispatcher->request(
		$this->path("3/album",[],[],\%p),
		'post',
		\%p
	);
}

sub update {
	my ($this,%p) = @_;

	return $this->dispatcher->request(
		$this->path("3/album/%s",['album'],[],\%p),
		'put',
		\%p
	);
}

sub delete {

lib/Imgur/API/Endpoint/Gallery.pm  view on Meta::CPAN

sub tagVote {
	my ($this,%p) = @_;

	return $this->dispatcher->request(
		$this->path("3/gallery/%s/vote/tag/%s/%s",['gallery','t_name','vote'],[],\%p),
		'post',
		\%p
	);
}

sub updateGalleryTags {
	my ($this,%p) = @_;

	return $this->dispatcher->request(
		$this->path("3/gallery/tags/%s",['gallery'],[],\%p),
		'post',
		\%p
	);
}

sub search {

lib/Imgur/API/Endpoint/Image.pm  view on Meta::CPAN

sub delete {
	my ($this,%p) = @_;

	return $this->dispatcher->request(
		$this->path("3/image/%s",['image'],[],\%p),
		'delete',
		\%p
	);
}

sub update {
	my ($this,%p) = @_;

	return $this->dispatcher->request(
		$this->path("3/image/%s",['image'],[],\%p),
		'post',
		\%p
	);
}

sub favorite {

lib/Imgur/API/Stats.pm  view on Meta::CPAN

has user_remaining=>(is=>'rw',default=>sub{0;});
has user_reset=>(is=>'rw',default=>sub{0;});

has client_limit=>(is=>'rw',default=>sub{0;});
has client_remaining=>(is=>'rw',default=>sub {0;});

has post_limit=>(is=>'rw',default=>sub{0;});
has post_remaining=>(is=>'rw',default=>sub{0;});
has post_reset=>(is=>'rw',default=>sub{0;});

sub update {
	my ($self,$response) = @_;

	if (ref($response) eq "HTTP::Response") {
		foreach my $tp (
			['x-ratelimit-userlimit','user_limit'],['x-ratelimit-userremaining','user_remaining'],
			['x-ratelimit-userreset','user_reset'],['x-ratelimit-clientlimit','client_limit'],
			['x-ratelimit-clientlimit','c'],['x-post-rate-limit-limit','post_limit'],
			['x-post-rate-limit-remaining','post_remaining'],['x-ratelimit-clientlimit','post_limit']
		) {
			if ($response->header($tp->[0])) {



( run in 0.343 second using v1.01-cache-2.11-cpan-95122f20152 )