johansatge/workflowy-php

Can't fetch embedded lists

Closed this issue · 1 comments

Thank you for making this API. It's great.

The only problem I seem to be having is that I can't seem to get any data other than the ID from embedded lists (lists that have been shared).

In my returned lists, I can perform getID() on the embedded list, and that is successfully returned. However the name is blank and its sublists are just an empty array.

Is this expected behaviour or do you know of any way to work around this?

Thanks in advance.

Hi!

thank you for your message.

I couldn't reproduce the bug, here is what I did:

$list_request = new WorkFlowyList('my-generated-session-id');
$list = $list_request->getList();

$shared_list = $list->searchSublist('#Sharing test#');
var_dump($shared_list->getName());

$children = $shared_list->getSublists();
foreach($children as $child)
{
  var_dump($child->getName());
}

// Outputs:
// string(12) "Sharing test"
// string(10) "Sub test 1"
// string(10) "Sub test 2"

workflowy 2017-11-05 00-38-42

I also shared the list by email instead of private link, but it works too.

Do you see a difference with your code which could explain I don't see the bug?