Hypothesis-API
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/Hypothesis/API.pm view on Meta::CPAN
Updates the annotation for a given annotation id if id is defined and
the user is authenticated and has update permissions. Takes a payload
as described for 'search'. Only fields specified in the new payload
are altered; other existing fields should remain unchanged.
Returns a boolean value indicating whether or not the annotation for
that id has been successfully updated (1 = yes, 0 = no).
=cut
sub update_id {
my ($self, $id, $payload) = @_;
if (not defined $id) {
die "Can only call update if given an id.";
}
my $data = $json->encode($payload);
my $h = HTTP::Headers->new;
$h->header(
'content-type' => 'application/json;charset=UTF-8',
'x-csrf-token' => $self->csrf_token,
'X-Annotator-Auth-Token' => $self->token,
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.462 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )