Social API – Tag Patterns and other optimization thoughts

Generally, I find developers implementing scenarios, such as “As a User, I need to iterate over X Social API, so I can find the right content.”  The scenario implies that the social metadata is included, however many developers iterate over the entries in the feeds to discover the Tag metadata.  If you read the documentation parameters, you can find optimizations to include metadata in the feed request, such as:

includeTags

boolean Yes Specifies whether or not the tags that are displayed on the file welcome page are included in the returned Atom document. This parameter takes a Boolean value of either true or false. By default, the tags are not returned.

The URL Parameter that reduces the total number of requests needed. For instance, the request for a each of the 10 entries in a feed, and then the tags for those 10 entries appears to require 11 API calls with the includeTags=true it can be accomplished in one request.

You can also optimize the request by manipulating the page size – 1,10 or 25.

In some cases, you can further optimize with batch requests when creating content. Example, the Activities API enables batch deletes of Members or the OpenSocial ActivityStream API which enables batch creation of updates.