Skip to content
This repository was archived by the owner on Jul 3, 2019. It is now read-only.

Conversation

@MarkAYoder
Copy link

I made a simple change so options can be sent.

wolfram.query({search: "words containing msdoep",
options:
"&podstate=WordsMadeWithOnlyLetters__Show+all" +
"&podstate=WordsMadeWithOnlyLetters__Disallow+repetition" +
"&includepodid=WordsMadeWithOnlyLetters"},
function(err, result) {
if(err) throw err
console.log("Size: %d", result.length);
console.log("Result: %j", result[0].subpods[0].value);
})

If a string is passed as the first parameter, then query works as before.

--Mark

@strax
Copy link
Owner

strax commented Jun 28, 2015

Sorry for the long delay answering!

I'd rather see this evolve to a more native way of passing in options. Your example could be written as:

wolfram.query({
  search: "words containing msdoep", 
  options: {
    podstate: ["WordsMadeWithOnlyLetters__Show+all", "WordsMadeWithOnlyLetters__Disallow+repetition"],
    includepodid: "WordsMadeWithOnlyLetters"
  }
});

If you can modify the code to parse an options hash into a query string, I'd be happy to merge 😊

@strax
Copy link
Owner

strax commented Jun 28, 2015

Note that #12 implements the aforementioned functionality without unit tests though

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants