The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

WebService::GetSongBPM - Access to the getsongbpm.com API

VERSION

version 0.0401

SYNOPSIS

  use WebService::GetSongBPM;
  my $ws = WebService::GetSongBPM->new(
    api_key => '1234567890abcdefghij',
    artist  => 'van halen',
    song    => 'jump',
  );
  # OR
  $ws = WebService::GetSongBPM->new(
    api_key   => '1234567890abcdefghij',
    artist_id => 'abc123',
  );
  # OR
  $ws = WebService::GetSongBPM->new(
    api_key => '1234567890abcdefghij',
    song_id => 'xyz123',
  );
  my $res = $ws->fetch();
  my $bpm = $res->{song}{tempo};

DESCRIPTION

WebService::GetSongBPM provides access to https://getsongbpm.com/api.

ATTRIBUTES

api_key

Your authorized access key.

base

The base URL. Default: https://api.getsongbpm.com

artist

The artist for which to search.

artist_id

The artist id for which to search.

song

The song for which to search.

song_id

The song id for which to search.

ua

The user agent.

METHODS

new()

  $ws = WebService::GetSongBPM->new(%arguments);

Create a new WebService::GetSongBPM object.

fetch()

  $r = $w->fetch();

Fetch the results and return them as a HashRef.

SEE ALSO

Moo

Mojo::UserAgent

Mojo::JSON::MaybeXS

Mojo::JSON

https://getsongbpm.com/api

AUTHOR

Gene Boggs <gene@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2022 by Gene Boggs.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.