Hi pbworks API developers,
I'm Gordon, an education technology developer. I am new to pbworks'
api, and I have a lot of questions that I hope you can help me with.
1. I see in the API calls are organized by Contexts and I'm not really
sure what those mean except that different
pbworks.com accounts have
access to different contexts. For example, I read that Classroom
accounts (which I am using for testing) can only access the Wiki
context API calls. But there is also an "Any" context that seems, and
calls to that seem to work.
2. is it possible to set folder permissions (group access) via the
API? I don't see any calls. There is a "setFilePermissions" (though
the user manual it states it is not possible to set permissions on a
"file") and there is a SetPageUserPermission, but nothing I can find
that would set Folder permissions.
3. is it possible to assign groups to users via the API? I can't seem
to find an API call that allows that.
3.b. If the 3 is possible, then we would be able to assign multiple
groups to users? - I see the user info returned by the API call
GetUserInfo shows the group assignment is represented in an array,
implying a user can belong to multiple groups...
4. GetPages - I am using javascript and ajax to load and access data
returned by the API calls. I note that using GetPages, the returns and
object that contains a "pages" "array" (technically it is not a
javascript array object). In trying to iterate through pages, for
example: with a for( var i in pages ), it appears there are many more
elements in the pages array than the _total_count field denotes. It
looks like the pages array also contains elements that are function
pointers, and which are not visible in the returned text data. What
is going on there - is evalJSON(), which I use to transform the
returned text into a javascript object, not parsing what is returned
by GetPages properly? (it looks like the javascript object returned by
evalJSON() over steps its bounds, an perhaps what is returned by
GetPages is not closed properly.) I use the exact same code to load,
parse, and iterate through the folders array returned by GetFolders
and this problem does not occur.
Well, that's a lot for now! Thanks for your help with these
questions!
Gordon