Getting Mastodon Bookmarks

Tags:

Some time ago I created an app to grab my toots using the Perl module Mastodon::Client for this.

Lately I wanted to grab bookmarks with the idea to be able to search through them more easily.

There's just one problem. Mastodon::Client doesn't have a method to get bookmarks.

So I created a very crude one:

sub Mastodon::Client::get_bookmarks {
  my $self = shift;
  my ($params) = @_;

  my $endpoint = q(/bookmarks);

  return $self->get($endpoint, $params);
}

It needs more to really fit in with the rest of the module.

A very crude example/usage for a very crude methods

my $bookmarks = $client->get_bookmarks(
  {
    limit => 40,
  }
);

I really should find some time to figure out how to implement properly, make tests, etc., and then put in a PR.

Some day.

EDIT: Shout out to hisdeedsaredust for catching that I messed up the Markdown syntax for the href and text. That's what I get for blogging while tired.