Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

webservice::musicbrainz::releasegroup(3pm) [debian man page]

WebService::MusicBrainz::ReleaseGroup(3pm)		User Contributed Perl Documentation		WebService::MusicBrainz::ReleaseGroup(3pm)

NAME
WebService::MusicBrainz::ReleaseGroup SYNOPSIS
use WebService::MusicBrainz::ReleaseGroup; my $ws = WebService::MusicBrainz::ReleaseGroup->new(); my $response = $ws->search({ TITLE => 'ok computer' }); my $release = $response->release(); # grab first one in the list print $release->title(), " (", $release->type(), ") - ", $release->artist()->name(), " "; # OUTPUT: OK Computer (Album Official) - Radiohead DESCRIPTION
METHODS
new() This method is the constructor and it will call for initialization. query() This method will return the cached query object; search() This method is used to search the MusicBrainz database using their web service schema. The only argument is a hashref to define the search parameters. my $ws = WebService::MusicBrainz::Release->new(); my $response = $ws->search({ TITLE => 'Highway to Hell' }); my $response = $ws->search({ ARTIST => 'sleater kinney' }); my $response = $ws->search({ ARTIST => 'beatles', OFFSET => 4 }); my $response = $ws->search({ ARTISTID => '65f4f0c5-ef9e-490c-aee3-909e7ae6b2ab' }); my $response = $ws->search({ DISCID => 'XgrrQ8Npf9Uz_trPIFMrSz6Mk6Q-' }); my $response = $ws->search({ RELEASETYPES => 'Official', MBID => 'a89e1d92-5381-4dab-ba51-733137d0e431' }); my $response = $ws->search({ MBID => 'fed37cfc-2a6d-4569-9ac0-501a7c7598eb', INC => 'artist' }); my $response = $ws->search({ MBID => 'fed37cfc-2a6d-4569-9ac0-501a7c7598eb', INC => 'counts' }); my $response = $ws->search({ MBID => 'fed37cfc-2a6d-4569-9ac0-501a7c7598eb', INC => 'release-events' }); my $response = $ws->search({ MBID => 'fed37cfc-2a6d-4569-9ac0-501a7c7598eb', INC => 'discs' }); my $response = $ws->search({ MBID => 'fed37cfc-2a6d-4569-9ac0-501a7c7598eb', INC => 'tracks' }); my $response = $ws->search({ MBID => 'fed37cfc-2a6d-4569-9ac0-501a7c7598eb', INC => 'artist-rels' }); my $response = $ws->search({ MBID => 'fed37cfc-2a6d-4569-9ac0-501a7c7598eb', INC => 'release-rels' }); my $response = $ws->search({ MBID => 'fed37cfc-2a6d-4569-9ac0-501a7c7598eb', INC => 'track-rels' }); my $response = $ws->search({ MBID => 'fed37cfc-2a6d-4569-9ac0-501a7c7598eb', INC => 'url-rels' }); Multiple INC params can be delimited by whitespace, commas, or + characters. my $response = $ws->search({ MBID => 'fed37cfc-2a6d-4569-9ac0-501a7c7598eb', INC => 'artist url-rels' }); my $response = $ws->search({ MBID => 'fed37cfc-2a6d-4569-9ac0-501a7c7598eb', INC => 'artist,url-rels' }); my $response = $ws->search({ MBID => 'fed37cfc-2a6d-4569-9ac0-501a7c7598eb', INC => 'artist+url-rels' }); AUTHOR
Bob Faist <bob.faist@gmail.com> COPYRIGHT AND LICENSE
Copyright 2006-2007 by Bob Faist This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
http://wiki.musicbrainz.org/XMLWebService perl v5.10.1 2009-12-06 WebService::MusicBrainz::ReleaseGroup(3pm)

Check Out this Related Man Page

WebService::Solr(3pm)					User Contributed Perl Documentation				     WebService::Solr(3pm)

NAME
WebService::Solr - Module to interface with the Solr (Lucene) webservice SYNOPSIS
my $solr = WebService::Solr->new; $solr->add( @docs ); my $response = $solr->search( $query ); for my $doc ( $response->docs ) { print $doc->value_for( $id ); } DESCRIPTION
WebService::Solr is a client library for Apache Lucene's Solr; an enterprise-grade indexing and searching platform. ACCESSORS
o url - the webservice base url o agent - a user agent object o autocommit - a boolean value for automatic commit() after add/update/delete (default: enabled) o default_params - a hashref of parameters to send on every request o last_response - stores a WebService::Solr::Response for the last request HTTP KEEP-ALIVE Enabling HTTP Keep-Alive is as simple as passing your custom user-agent to the constructor. my $solr = WebService::Solr->new( $url, { agent => LWP::UserAgent->new( keep_alive => 1 ) } ); Visit LWP::UserAgent's documentation for more information and available options. METHODS
new( $url, \%options ) Creates a new WebService::Solr instance. If $url is omitted, then "http://localhost:8983/solr" is used as a default. Available options are listed in the ACCESSORS section. BUILDARGS( @args ) A Moose override to allow our custom constructor. add( $doc|@docs, \%options ) Adds a number of documents to the index. Returns true on success, false otherwise. A document can be a WebService::Solr::Document object or a structure that can be passed to "WebService::Solr::Document->new". Available options as of Solr 1.4 are: o overwrite (default: true) - Replace previously added documents with the same uniqueKey o commitWithin (in milliseconds) - The document will be added within the specified time update( $doc|@docs, \%options ) Alias for "add()". delete( \%options ) Deletes documents matching the options provided. The delete operation currently accepts "query" and "id" parameters. Multiple values can be specified as array references. # delete documents matching "title:bar" or uniqueId 13 or 42 $solr->delete( { query => 'title:bar', id => [ 13, 42 ], } ); delete_by_id( $id ) Deletes all documents matching the id specified. Returns true on success, false otherwise. delete_by_query( $query ) Deletes documents matching $query. Returns true on success, false otherwise. search( $query, \%options ) Searches the index given a $query. Returns a WebService::Solr::Response object. All key-value pairs supplied in "\%options" are serialzied in the request URL. auto_suggest( \%options ) Get suggestions from a list of terms for a given field. The Solr wiki has more details about the available options (http://wiki.apache.org/solr/TermsComponent) commit( \%options ) Sends a commit command. Returns true on success, false otherwise. You must do a commit after an add, update or delete. By default, autocommit is enabled. You may disable autocommit to allow you to issue commit commands manually: my $solr = WebService::Solr->new( undef, { autocommit => 0 } ); $solr->add( $doc ); # will not automatically call commit() $solr->commit; Options as of Solr 1.4 include: o maxSegments (default: 1) - Optimizes down to at most this number of segments o waitFlush (default: true) - Block until index changes are flushed to disk o waitSearcher (default: true) - Block until a new searcher is opened o expungeDeletes (default: false) - Merge segments with deletes away rollback( ) This method will rollback any additions/deletions since the last commit. optimize( \%options ) Sends an optimize command. Returns true on success, false otherwise. Options as of Solr 1.4 are the same as "commit()". ping( ) Sends a basic ping request. Returns true on success, false otherwise. generic_solr_request( $path, \%query ) Performs a simple "GET" request appending $path to the base URL and using key-value pairs from "\%query" to generate the query string. This should allow you to access parts of the Solr API that don't yet have their own correspodingly named function (e.g. "dataimport" ). SEE ALSO
o http://lucene.apache.org/solr/ o Solr - an alternate library AUTHORS
Brian Cassidy <bricas@cpan.org> Kirk Beers COPYRIGHT AND LICENSE
Copyright 2008-2012 National Adult Literacy Database This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2012-05-25 WebService::Solr(3pm)
Man Page