Hi all,
I'm trying to extend the php version of Shindig to add additional
attributes for persons.
I have added a feature "eduapi-0.1" and this is loaded correctly as I
can define it as required in a gadget.
feature.xml:
<feature>
<name>eduapi-0.1</name>
<dependency>opensocial</dependency>
</feature>
- By the way, a short note in the readme that accompanties the features
directory on the fact that shindig caches the featureset would be nice-
Now I want to add e.g. eduapi.studentnumber to the person attributes.
I'm trying to figure out what I need to do where, any pointers whould be
kindly appreciated.
Following the compliance spec: "Extra person, activity or other object
fields should be defined in an enum under the container's namespace, and
the environment should allow applications to discover these fields."
I've added a educontainer.js to the config dir of Shindig. Is it correct
that this file only contains the new stuff? So is the code below enough?
---------
{"gadgets.container" : ["eduapi"],
"gadgets.features" : {
"eduapi" : {
// Path to fetch eduapi data from
// Must be on the same domain as the gadget rendering server
"path" : "http://%host%/eduapi/rpc",
// Path to issue invalidate calls
"invalidatePath" : "http://%host%/gadgets/api/rpc",
"domain" : "shindig",
"enableCaja" : false,
"supportedFields" : {
"person" : ["studentnumber"]
}
}
}}
-------
If I'm correct I should now implement some php code in a subdirectory
eduapi, which sits at the same level as the opensocial directory, both a
subdir of /php/src/
Is that correct? What exacly should be implemented? Is only implementing
some additional call to get the studentnumber ok, or should the entire
framework for handling data etc be implemented as well?
Also, my widgets keep complaining that eduapi is not defined.
The widget tries something like:
function requestPersonInfo() {
var request = eduapi.newDataRequest();
var params = {};
params[eduapi.DataRequest.PeopleRequestFields.PROFILE_DETAILS] =
[eduapi.Person.Field.STUDENTNUMBER];
I seem to be missing something that hooks up the widget call to the php
code. Could someone point me in the right direction?
thanx in advance,
regards,
Niels
--
Niels van Dijk
Advanced Services
T: +31 302 305 337 / M: +31 651 347 657
SURFnet - PO Box 19035 - NL-3501 DA Utrecht - The Netherlands -
http://www.surfnet.nl
SURFnet grensverleggend netwerk voor hoger onderwijs en onderzoek