Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/felquis/filtro-merriam-audio
This filtro module returns the audios of words from Merriam Webster website
https://github.com/felquis/filtro-merriam-audio
Last synced: 1 day ago
JSON representation
This filtro module returns the audios of words from Merriam Webster website
- Host: GitHub
- URL: https://github.com/felquis/filtro-merriam-audio
- Owner: felquis
- Created: 2014-08-26T17:18:25.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-08-26T17:36:33.000Z (about 10 years ago)
- Last Synced: 2024-10-10T10:44:01.071Z (28 days ago)
- Language: JavaScript
- Homepage:
- Size: 121 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
filtro-merriam-audio
====================This filtro module returns the audios of words from Merriam Webster website
## Install
`npm install filtro-merriam-audio`
## Usage
Require filtro package
```
var filtro = require('filtro').filtro
```Call the function filtro using `merriam-audio` module
```js
var word = 'write';filtro({
url: 'http://www.merriam-webster.com/dictionary/' + encodeURI(word),
modules: ['merriam-audio'],
onError: function (error) {
console.log('Error: ', error);
},
onContent: function (result) {
console.log('All audios found in this page ', result)
console.log(result['merriam-audio'].audios[word])
}
});
```The `result` will look like this:
```js
{
'merriam-audio': {
audios: [
write: {
file: 'write001',
word: 'write',
firstLetter: 'w',
completeUrl: 'http://media.merriam-webster.com/soundc11/w/write001.wav'
},
wrote: {
file: 'wrote001',
word: 'wrote',
firstLetter: 'w',
completeUrl: 'http://media.merriam-webster.com/soundc11/w/wrote001.wav'
},
written: {
file: 'writte01',
word: 'written',
firstLetter: 'w',
completeUrl: 'http://media.merriam-webster.com/soundc11/w/writte01.wav'
},
writ: {
file: 'writ0002',
word: 'writ',
firstLetter: 'w',
completeUrl: 'http://media.merriam-webster.com/soundc11/w/writ0002.wav'
},
writing: {
file: 'writin01',
word: 'writing',
firstLetter: 'w',
completeUrl: 'http://media.merriam-webster.com/soundc11/w/writin01.wav'
}
]
}
}
```## Alert
If you use this filtro module, make sure to inform your users that the content is from [Merriam Webster](http://www.merriam-webster.com/)
---
> :warning: This is a [Filtro](http://github.com/felquis/filtro) module.
---