Ning Developer Docs

With the REST API atom content feed I cannot find a plain list of attributes that it will return.
If I query photos, I know I can get title, and a link to the image. But if I want to see if I can get my.averageRating.

I assume my.averageRating can only be pulled from the content store via PHP API.
This doesnt work...
.../xn/atom/1.0/content(type=%27Photo%27)?order=my.averageRating@D&to=5

So thats cool - I will fork the code, and make some php.

But I still cannot find a definitive list of the attributes in the "my" data structure. Am I missing something?

Views: 21

Replies to This Discussion

It's only as safe as your external site, which should have file permissions set correctly (especially in a shared server environment), a good firewall, and trusted software.
Ideally if you hardcode the username and password in the file, you wouldn't leave it sitting in the filesystem when it's not in use. If the network doesn't have the 'remove promotional links' premium service applied to it, it is possible for someone else to access the file. Better alternatives if you wanted to have the file remain in the filesystem would be to either have it read the password from a file kept in the xn_private directory, or to have the file use a form to collect the credentials from you each time before running the api request.

Thanks,
Phil
Oddly I cant get the php file included here to work. Though I can get the three php files above working fine.

In get_pictures_all.php,
$xml = new SimpleXMLElement($result);
echo "\$xml->asXML():" . $xml->asXML();

outputs the proper XML, everything works fine.

In get_groups_members.php
$xml = new SimpleXMLElement($result);
echo "\$xml->asXML():" . $xml->asXML();

outputs the Rest url I passed to it ($result).


Its exactly the same code- its like SimpleXMLElement fails with the Group Atom Feed.

This this one
Attachments:
Thats weird, I thought I replied to this.

Yep, grabbing the 'Users' does work. Is there a difference in the 'Groups' and 'Users' authentication requirements?
great, how do we limit the result returned? :)
Hmm, besides setting the number of iterations in the loop for user queries, I'm not sure. It seems to work for content type video, photos.
Ah, adding this after the query worked -- '?order=published@D&from=0&to=16' -- just took awhile to set. Where D is descending.
How about changing the script to list e-mail addresses of users instead of profile pictures?

Thanks for tips!
Jason
how do i display username instead of groupmember's id for this script "get_member_all.php" ?
The simple answer?
you'd parse the array where the url comes from for the username.

RSS

© 2026   Created by Ning Developer Admin.   Powered by

Badges  |  Report an Issue  |  Terms of Service