-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from richardleach/master
Update API Response Model
- Loading branch information
Showing
8 changed files
with
261 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
=head1 NAME | ||
Net::Songkick::City - Models a city in the Songkick API | ||
=cut | ||
|
||
package Net::Songkick::City; | ||
|
||
use strict; | ||
use warnings; | ||
use Moose; | ||
use Moose::Util::TypeConstraints; | ||
|
||
use Net::Songkick::Country; | ||
|
||
coerce 'Net::Songkick::City', | ||
from 'HashRef', | ||
via { Net::Songkick::City->new($_) }; | ||
|
||
has $_ => ( | ||
is => 'ro', | ||
isa => 'Str', | ||
) for qw[displayName id uri]; | ||
|
||
has country => ( | ||
is => 'ro', | ||
isa => 'Net::Songkick::Country', | ||
coerce => 1, | ||
); | ||
|
||
no Moose; | ||
__PACKAGE__->meta->make_immutable; | ||
|
||
=head1 AUTHOR | ||
Dave Cross <dave@mag-sol.com> | ||
=head1 SEE ALSO | ||
perl(1), L<http://www.songkick.com/>, L<http://developer.songkick.com/> | ||
=head1 COPYRIGHT AND LICENSE | ||
Copyright (C) 2018, Magnum Solutions Ltd. All Rights Reserved. | ||
This script is free software; you can redistribute it and/or modify it | ||
under the same terms as Perl itself. | ||
=cut | ||
|
||
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
=head1 NAME | ||
Net::Songkick::City - Models a MusicBrainz identifier in the Songkick API | ||
=cut | ||
|
||
package Net::Songkick::MusicBrainz; | ||
|
||
use strict; | ||
use warnings; | ||
use Moose; | ||
use Moose::Util::TypeConstraints; | ||
|
||
coerce 'Net::Songkick::MusicBrainz', | ||
from 'HashRef', | ||
via { Net::Songkick::MusicBrainz->new($_) }; | ||
|
||
has $_ => ( | ||
is => 'ro', | ||
isa => 'Str', | ||
) for qw[href mbid]; | ||
|
||
no Moose; | ||
__PACKAGE__->meta->make_immutable; | ||
|
||
=head1 AUTHOR | ||
Dave Cross <dave@mag-sol.com> | ||
=head1 SEE ALSO | ||
perl(1), L<http://www.songkick.com/>, L<http://developer.songkick.com/> | ||
=head1 COPYRIGHT AND LICENSE | ||
Copyright (C) 2018, Magnum Solutions Ltd. All Rights Reserved. | ||
This script is free software; you can redistribute it and/or modify it | ||
under the same terms as Perl itself. | ||
=cut | ||
|
||
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.