Social Networking Library: REST interface
|Status:||Closed||Start date:||Dec 10, 2015|
|Priority:||Normal||Due date:||Jan 16, 2016|
|Assignee:||Costantino Perciante||% Done:|
|Sprint:||zz - UnSprintable|
The Social Networking Library should be capable of being contacted not only from webapps running in the portal but also from the outside world in a secure and safe manner.
#3 Updated by Costantino Perciante almost 4 years ago
- % Done changed from 0 to 40
A subset of the methods available in the social-networking-library written by Massimiliano has been exposed up to now. The first part of the http path you need to use is this one: http://dev.d4science.org/social-networking-library-ws/rest/
Two (HTTP-POST) methods are the following ones:
1) tokens/generateApplicationToken that accepts as (form) parameters "appid" and "token" (the token should belong to a user and the appid is the identifier of the application for which an ApplicationProfile alread exists. You got an error if the appid doesn't exist or the token is not valid.)
2) feeds/writeFeedApplication that accepts as (form) parameters "text" (text of the post), "params" (additional parameters if your application supports the direct opening of of this update's object e.g. id=12345&type=foo), "previewtitle" (a title for the preview of the post), "previewdescription" (a description for the preview of the post), "httpimageurl" (if you want to put an image, pass its url), "token" that must be an application token (likely generated by invoking the previous method).
I've tested them with this firefox plugin https://addons.mozilla.org/it/firefox/addon/restclient/
Please remember to set the in the http header the Content-Type as application/x-www-form-urlencoded.
Other methods are available, look at https://wiki.gcube-system.org/gcube/Social_Networking_Library_Web_Service_Interface for more information.
#4 Updated by Massimiliano Assante almost 4 years ago
- % Done changed from 40 to 80
@firstname.lastname@example.org we completed the documentation wiki page, if you have any question feel free to ask