gitpan / mw-api Goto Github PK
View Code? Open in Web Editor NEWRead-only release history for MW-API
Home Page: http://metacpan.org/release/MW-API
License: Other
Read-only release history for MW-API
Home Page: http://metacpan.org/release/MW-API
License: Other
NAME Net::MW::API - use Merriam-Webster dictionay API in Perl SYNOPSIS use Net::MW::API; my $mw = Net::MW::API->new(dict => "collegiate", word => "$the-word-to-query", key => "$your-key-here"); my $xml = $mw->raw_xml; # a string my $dom = $mw->dom; # XML::LibXML::Document my @entries = $mw->entries(); # @entries is list of XML::LibXML::Element my $audio_uri = $mw->audio_url; # ex. http://media.merriam-webster.com/soundc11/t/test0001.wav DESCRIPTION Net::MW::API is an api to merriam-webster.com dictionary. It gives you xml result based on your query. it use XML::LibXML to process the XML result (very basic). If you need to get the value of specific node, probably you need to deal with the xml yourself. Attributes dict has 'dict' => ( is => 'rw', isa => 'Str', required => 1 ); the dictionary you want to use word has 'word' => ( is => 'rw', isa => 'Str', required => 1 ); the word to query key has 'key' => ( is => 'ro', isa => 'Str', required => 1 ); url the query url based on $dict, $word, $key reference: http://www.dictionaryapi.com/api/v1/references/$dic/xml/$word?key=$key raw_xml the xml you get based on your query dom the dom (XML::LibXML::Document) base on your query Method entries the @entries of dom audio_url the audio url of the query word AUTHOR Hao Wu <[email protected]> COPYRIGHT Copyright 2013- Hao Wu LICENSE This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO XML::LibXML
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.