Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get parameters working #1

Open
ebertx opened this issue Jun 12, 2013 · 1 comment
Open

Can't get parameters working #1

ebertx opened this issue Jun 12, 2013 · 1 comment

Comments

@ebertx
Copy link

ebertx commented Jun 12, 2013

Not sure what the problem is, but no matter what I do I can't seem to get the parameters to work properly.

    wn.word(req.params.word, {
        useCanonical: true
    }, function(e, word) {

       word.related({
            limitPerRelationshipType: 5,
            relationshipTypes: 'synonym'
        }, function(e, response) {

            console.log(response);
            res.send(response);

        });

    });

When I call it using the word "angry", I get the following:

[
  {
    "words": [
      "enraged",
      "stormy",
      "wrathful",
      "wroth",
      "unhealthy",
      "livid",
      "maddened",
      "hot under the collar",
      "irascible",
      "sore"
    ],
    "relationshipType": "equivalent"
  }
]
@madhukar-m-mallia
Copy link

Hi @ebertx ,

It looks like the word for 'relatedWords' API is specified incorrectly in the library. In the lib/wordnik.js and lib/word.js files, replace the string 'related' with 'relatedWords' so that the API is called properly. made this tweak and the API works good. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants