1.0.0 • Published 4 years ago

ask-results v1.0.0

Weekly downloads
3
License
ISC
Repository
github
Last release
4 years ago

ask-results

A node.js package used to retrieve an array of ask results with links, descriptions, and titles.

Install

npm i ask-results

Configure app

const ask = require('ask-results');

config = {
    bannedWords: Array,
    resultAmount: int
}

ask('QUERY STRING', CONFIG (optional)).then(results => {
    console.log(results)
})

Return Value

results = [
    {
        "title": string,
        "href": string,
        "description": string
    }
]

Example

config = {
    bannedWords: ['papa', 'hut', 'cheese']
    resultAmount: 5
}

ask('pizza', config).then(results => {
    console.log(results)
})

Descriptions

// Optional Parameter
config = {
    bannedWords:  An array of words that will cause links to be excluded in they are included in the title.
    resultAmount: This integer is the maximum number of links to be returned from your query. (max 10)
}
1.0.0

4 years ago