spotzero / wsdata

wsdata development mirroring drupal.org
1 stars 3 forks source link

Token Replacement Doesn't Seem To Work #10

Closed lquessenberry closed 6 years ago

lquessenberry commented 6 years ago

I had a replacement string in my path...

"search?id=44bc40f3bc04f65b7a35&thumbsize=medium&stars=[person]"

I wanted to replace it with the node title or any other field for that matter and the debug shows this.

'replacements' => array(1)
'person' => string(12) "[node:title]"

I suspect that this is not working right. It looks like to me it literally used [node:title] as the value of the string.

morinluc0 commented 6 years ago

So there are 2 token replacements that take place. The debug more takes place after the 1st token replacement. I did this to simplify the debug code but looking back now It may make sense to move it into the connector so that way we can provide the completed url before we sent it to guzzle and we can also capture the response.

I have pushed a update to the debug branch that should show you the fully replaced uri. If there is a still a problem with the token replacement let me know we can troubleshoot further.

lquessenberry commented 6 years ago

Awesome. I was also having trouble getting the tokens to actually work. If you have some time today, perhaps a quick video call will help me get on the same page.

morinluc0 commented 6 years ago

Token are working just need to add better documentation on how to use them appropriately going to track some documents in issue #22