Data-API
Methods
Friends
- chat.getOnlineFriends
- events.getPresenceForFriends
- friends.get
- friends.getConnection
- friends.getDistance
- friends.getIncomingInvitations
- friends.getOutgoingInvitations
- tips.getForFriends
- users.getByFriendLastlogin
- users.getFriendsByBirthday
- users.getFriendsByLoggedinSorted
- users.searchInFriends
- wwws.getForFriends
Hubs
- albums.getByHub
- blogs.getByHub
- events.getByHub
- gadgets.getByHub
- hubcategories.get
- hubcategories.getByHubType
- hubcategories.getChildren
- hubs.get
- hubs.getByHubCategory
- hubs.getByShortname
- hubs.getBySpatialRadiusMostPopular
- hubs.getByUser
- hubs.getHubTypes
- hubs.getScraps
- hubs.search
- polls.getByHub
- threads.getByHub
- tips.getByHub
- wwws.getByHub
Media
- albums.addMedia
- albums.create
- albums.get
- albums.getBuiltin
- albums.getByHub
- albums.getByUser
- albums.removeMedia
- hubs.updateMedia
- media.addSpotted
- media.addTag
- media.createRespect
- media.get
- media.getByAlbum
- media.getByLoggedin
- media.getByTag
- media.getComments
- media.getMediaEditToken
- media.getPublic
- media.getRespects
- media.getSpotted
- media.getUploadToken
- media.update
- media.updateGeolocation
Users
- albums.getByUser
- blogs.getByUser
- chat.getOnlineFriends
- events.getByLoggedin
- gadgets.getByUser
- media.getByLoggedin
- polls.getByUser
- privatespots.getByLoggedin
- users.createRespect
- users.get
- users.getByFriendLastlogin
- users.getByHubLastlogin
- users.getByUsername
- users.getFriendsByBirthday
- users.getFriendsByLoggedinSorted
- users.getLoggedin
- users.getRespects
- users.getScraps
- users.getTestimonials
- wwws.getByUser
The API-global parameter "ha_returnfields" makes it possible to filter API-output server-side. The syntax used for filtering is based on very simple XML-Xpath..
Note: Non existing returnfields are ignored. You do not need to provide ha_returnfields filters for responsefields, responsefields are always added to the response. Except for responsefield "profilepicture", because there is a large amount of data within that node that you could filter.
For example with "users.get" you could add to ha_returnfields "/user/firstname,/user/lastname". The response will result in only the firstname and lastname.
Example XML-response
<?xml version="1.0" encoding="UTF-8" ?> <users_get_result> <user> <firstname>Gorilla</firstname> <lastname>Api</lastname> </user> <info> <timestamp_difference>6</timestamp_difference> <running_milliseconds>84</running_milliseconds> <secure_connection>false</secure_connection> </info> </users_get_result>
Another way is using a astrix (*), for example you can use "users.get" with returnfield "/user/birthday/*". This will get you all fields within "birthday" of each element.
Example XML-response
<?xml version="1.0" encoding="UTF-8" ?> <users_get_result> <user> <birthday> <year>1976</year> <month>12</month> <day>22</day> <age>32</age> </birthday> </user> <info> <timestamp_difference>6</timestamp_difference> <running_milliseconds>87</running_milliseconds> <secure_connection>false</secure_connection> </info> </users_get_result>
You can also use the "//" modifier to filter on nodes where ever they are in the nodetree, for example with "media.get" and returnfield "//src" will result in the image source urls for all media sizes.
Example XML-response
<?xml version="1.0" encoding="UTF-8"?> <media_get_result> <media> <icon_small> <src>http://94.100.116.115/205150001-205200000/205166401-205166500/205166437_1_R4lg.jpeg</src> </icon_small> <icon_medium> <src>http://94.100.116.115/205150001-205200000/205166401-205166500/205166437_2_R4lg.jpeg</src> </icon_medium> <icon_large> <src>http://94.100.116.115/205150001-205200000/205166401-205166500/205166437_3_R4lg.jpeg</src> </icon_large> <icon_extralarge> <src>http://94.100.116.115/205150001-205200000/205166401-205166500/205166437_4_R4lg.jpeg</src> </icon_extralarge> <image> <src>http://94.100.116.115/205150001-205200000/205166401-205166500/205166437_5_R4lg.jpeg</src> </image> <image_fullscreen> <src>http://94.100.116.115/205150001-205200000/205166401-205166500/205166437_6_R4lg.jpeg</src> </image_fullscreen> <square_large> <src>http://94.100.116.115/205150001-205200000/205166401-205166500/205166437_14_R4lg.jpeg</src> </square_large> <square_extralarge> <src>http://94.100.116.115/205150001-205200000/205166401-205166500/205166437_16_R4lg.jpeg</src> </square_extralarge> </media> <info> <timestamp_difference>6</timestamp_difference> <running_milliseconds>117</running_milliseconds> <secure_connection>false</secure_connection> </info> </media_get_result>