Primedia Search Args
Installation
❯ npm install --save @primediabroadcasting/search-args
var args = require('@primediabroadcasting/search-args');
args('...');
Examples
args('Wayne Ashley Berry');
{
"search": {
"terms": [
"Wayne",
"Ashley",
"Berry"
]
}
}
args('topic:Typography topic:"Robot Wars"');
{
"filter": {
"topic_name": [
"Robot Wars",
"Typography"
]
}
}
args('is:contactable language:1 language:English Shawn');
{
"search": {
"terms": [
"Shawn"
]
},
"filter": {
"contactable": true,
"language_id": [
1
],
"language_name": [
"English"
]
}
}
args('not:contactable direction:a-z');
{
"direction": "asc",
"filter": {
"contactable": false
}
}
args('direction:z-a is:deceased');
{
"direction": "desc",
"filter": {
"deceased": true
}
}