Helper Methods

Note: Current version does not support the full UserVoice API.

IList<Forum> GetForums ()
  GetForums method returns all the forums of the application
static Forum GetForum (string forumId)
  GetForum method returns the forum with the forum id. If the forum Id is not specified, it returns the initialized forum.
static IList<Suggestion> GetSuggestions (string forumId)
  GetSuggestion method returns all the suggestions from a forum.
static IList<Suggestion> SearchForSuggestions (string forumId, string query)
  SearchForSuggestions method retrieves the list of suggestions of a forum, filtered by the search query.
static IList<Comment> GetCommentsForSuggestions (string suggestionId, string forumId, string query)
  GetCommentsForSuggestions method returns the list of comments from a suggestion in a forum, filtered by a search query.
static bool IsInitialized ()
  IsInitialized method returns if the current instance is initialized.
static void Initialize (string key, string host, string forum, string ssoKey, string apiKey)
  This method initializes the helper with UserVoice parameters.
@helper FeedbackTab ()
  Displays the default UserVoice Feedback tab on your page or site.
@helper CustomTab ()
  Embeds the necessary script needed to add your own UserVoice Tab or link in your site. Rather than displaying the default tab, you'll need to create an anchor link or button and place and add onclick="UserVoice.Popin.show(uservoiceOptions); return false;" to the element.
@helper FeedbackTabWithSSO ([string guid], [string expires], [string displayName], [string avatarUrl], [string email], [string url])
  For paid UserVoice accounts, enables you to add SSO functionality to your site, so you can use your own user registration system to pass details to UserVoice when a user clicks on the Tab. The parameters above are set in your site and used by UserVoice to automatically create accounts for your users and log them in, bypassing a manual registration step.
@helper GetSuggestions ()
  Returns a list of suggestions for the forum id provided to UserVoice.Initialize().
@helper SearchForSuggestions ([string query])
  Returns a list of suggestions whose text contains the search query parameter.
@helper UserVoice.GetCommentsForSuggestion ([string suggestionId])
  Returns a list of comments for the provided suggestionId.
@helper GetForums ()
  Returns a list of forums for the site provided to UserVoice.Initialize().
@helper GetForum ()
  Returns details about the forum that matches the id provided to UserVoice.Initialize().

Last edited Jan 10, 2011 at 2:19 PM by jsenior, version 5

Comments

No comments yet.