A RESTful API to interface with UserVoice's feedback system. Online documentation available here: https://developer.uservoice.com/docs/api/v2/reference/.
This C# SDK is automatically generated by the Swagger Codegen project:
- API version: 2.0
- SDK version: 0.1
- Build package: io.swagger.codegen.languages.CSharpClientCodegen
The UserVoiceSdk is a proof-of-concept. Feel free to fork this repository and contribute to our efforts or report any issues you encounter. We appreciate your patience and thank you for helping us better connect you with the UserVoice V2 API!
- .NET 4.0 or later
- Windows Phone 7.1 (Mango)
The DLLs included in the package may not be the latest version. We recommned using [NuGet] (https://docs.nuget.org/consume/installing-nuget) to obtain the latest version of the packages:
Install-Package RestSharp
Install-Package Newtonsoft.Json
NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See RestSharp#742
Run the following command to generate the DLL
- [Mac/Linux]
/bin/sh build.sh
- [Windows]
build.bat
Then include the DLL (under the bin
folder) in the C# project, and use the namespaces:
using UserVoiceSdk.Api;
using UserVoiceSdk.Client;
using UserVoiceSdk.Models;
using System;
using System.Diagnostics;
using UserVoiceSdk.Api;
using UserVoiceSdk.Client;
using UserVoiceSdk.Models;
namespace Example
{
public class AttachmentsExample
{
private string ApiKey = "some_key";
private string ApiSecret = "some_secret";
private string Subdomain = "sub";
private string Domain = "uservoice.com";
// Credentials for authenticating as a user
private string Username = "[email protected]";
private string Password = "Somepassword1234!";
public void main()
{
var client = new ApiClient(subdomain: Subdomain,
clientId: ApiKey,
domain: Domain,
clientSecret: ApiSecret);
// Authentication takes place on request when a token is not available
// However, you can explicitly login using the functions below
//client.Login(ApiKey, ApiSecret);
//client.LoginAsUser(ApiKey, Username, Password);
var file = new System.IO.Stream(); // System.IO.Stream |
var includes = new List<string>(); // List<string> | (optional)
try
{
//
AttachmentResponse result = client.Attachments.Create(file, includes);
Debug.WriteLine(result);
}
catch (RateLimitException rle)
{
Debug.Print(string.Format("Rate limit exceeded. Limit: {0}, Remaining: {1}, Reset: {2}", client.RateLimiting.Limit, client.RateLimiting.Remaining, client.RateLimiting.Reset);
Debug.Print(string.Format("Reset in {0} seconds. Reset at {1} UTC", client.RateLimiting.ResetIn(), client.RateLimiting.ResetAt());
}
catch (ApiException e)
{
Debug.Print("Exception when calling AttachmentsApi.Create: " + e.Message );
}
}
}
}
Class | Method | HTTP request | Description |
---|---|---|---|
AttachmentsApi | Create | POST /admin/attachments | |
AttachmentsApi | DeleteById | DELETE /admin/attachments/{id} | # Delete an attachment |
AttachmentsApi | Get | GET /admin/attachments | # List attachments |
AttachmentsApi | GetById | GET /admin/attachments/{id} | # Retrieve attachments by id |
CategoriesApi | Create | POST /admin/categories | # Create a category |
CategoriesApi | DeleteById | DELETE /admin/categories/{id} | # Delete a category |
CategoriesApi | Get | GET /admin/categories | # List categories |
CategoriesApi | GetById | GET /admin/categories/{id} | # Retrieve categories by id |
CategoriesApi | UpdateById | PUT /admin/categories/{id} | # Update a category |
CommentsApi | ApproveById | PUT /admin/comments/{id}/approve | |
CommentsApi | Create | POST /admin/comments | # Create a comment |
CommentsApi | DeleteById | DELETE /admin/comments/{id} | # Delete a comment |
CommentsApi | Get | GET /admin/comments | # List comments |
CommentsApi | GetById | GET /admin/comments/{id} | # Retrieve comments by id |
CommentsApi | SpamById | PUT /admin/comments/{id}/spam | |
CommentsApi | UnremoveById | PUT /admin/comments/{id}/unremove | |
Custom_fieldsApi | Create | POST /admin/custom_fields | # Create a custom field |
Custom_fieldsApi | DeleteById | DELETE /admin/custom_fields/{id} | # Delete a custom field |
Custom_fieldsApi | Get | GET /admin/custom_fields | # List custom fields |
Custom_fieldsApi | GetById | GET /admin/custom_fields/{id} | # Retrieve custom fields by id |
Custom_fieldsApi | UpdateById | PUT /admin/custom_fields/{id} | # Update a custom field |
External_accountsApi | BulkDelete | DELETE /admin/external_accounts/bulk_delete | # Bulk delete external accounts by ID |
External_accountsApi | BulkDeleteByExternalId | DELETE /admin/external_accounts/bulk_delete_by_external_id | # Bulk delete external accounts by external ID |
External_accountsApi | Get | GET /admin/external_accounts | # List external accounts |
External_accountsApi | GetById | GET /admin/external_accounts/{id} | # Retrieve external accounts by id |
External_accountsApi | Import | POST /admin/external_accounts/import | |
External_usersApi | BulkDelete | DELETE /admin/external_users/bulk_delete | # Bulk delete external users by ID |
External_usersApi | BulkDeleteByExternalId | DELETE /admin/external_users/bulk_delete_by_external_id | # Bulk delete external users by external ID |
External_usersApi | Get | GET /admin/external_users | # List external users |
External_usersApi | GetById | GET /admin/external_users/{id} | # Retrieve external users by id |
External_usersApi | Import | POST /admin/external_users/import | # Import external users |
FeaturesApi | Create | POST /admin/features | # Create a feature |
FeaturesApi | DeleteById | DELETE /admin/features/{id} | # Delete a feature |
FeaturesApi | Get | GET /admin/features | # List features |
FeaturesApi | GetById | GET /admin/features/{id} | # Retrieve features by id |
FeaturesApi | UpdateById | PUT /admin/features/{id} | # Update a feature |
FeedbackApi | Create | POST /admin/feedback | # Create a feedback |
FeedbackApi | DeleteById | DELETE /admin/feedback/{id} | # Delete a feedback |
FeedbackApi | Get | GET /admin/feedback | # List feedback |
FeedbackApi | GetById | GET /admin/feedback/{id} | # Retrieve feedback by id |
FeedbackApi | UpdateById | PUT /admin/feedback/{id} | # Update a feedback |
Forum_invitationsApi | Create | POST /admin/forum_invitations | # Create a forum invitation |
Forum_invitationsApi | DeleteById | DELETE /admin/forum_invitations/{id} | # Delete a forum invitation |
Forum_invitationsApi | Get | GET /admin/forum_invitations | # List forum invitations |
Forum_invitationsApi | GetById | GET /admin/forum_invitations/{id} | # Retrieve forum invitations by id |
ForumsApi | Get | GET /admin/forums | # List forums |
ForumsApi | GetById | GET /admin/forums/{id} | # Retrieve forums by id |
IdentityApi | BulkIdentify | POST /admin/bulk_identify | # Add or update traits for a batch of users. |
LabelsApi | Attach | POST /admin/labels/attach | # Create a label |
LabelsApi | Create | POST /admin/labels | # Create a label |
LabelsApi | DeleteById | DELETE /admin/labels/{id} | # Delete a label |
LabelsApi | Detach | POST /admin/labels/detach | # Create a label |
LabelsApi | Get | GET /admin/labels | # List labels |
LabelsApi | GetById | GET /admin/labels/{id} | # Retrieve labels by id |
LabelsApi | UpdateById | PUT /admin/labels/{id} | # Update a label |
MessagesApi | Create | POST /admin/messages | # Create a message |
MessagesApi | Get | GET /admin/messages | # List messages |
MessagesApi | GetById | GET /admin/messages/{id} | # Retrieve messages by id |
NotesApi | Create | POST /admin/notes | # Create a note |
NotesApi | Get | GET /admin/notes | # List notes |
NotesApi | GetById | GET /admin/notes/{id} | # Retrieve notes by id |
NotesApi | UpdateById | PUT /admin/notes/{id} | # Update a note |
Nps_ratingsApi | Create | POST /admin/nps_ratings | # Create a nps rating |
Nps_ratingsApi | Get | GET /admin/nps_ratings | # List nps ratings |
Nps_ratingsApi | GetById | GET /admin/nps_ratings/{id} | # Retrieve nps ratings by id |
OauthApi | GetOauthToken | POST /oauth/token | |
Status_updatesApi | Create | POST /admin/status_updates | # Create a status update |
Status_updatesApi | DeleteById | DELETE /admin/status_updates/{id} | # Delete a status update |
Status_updatesApi | Get | GET /admin/status_updates | # List status updates |
Status_updatesApi | GetById | GET /admin/status_updates/{id} | # Retrieve status updates by id |
Status_updatesApi | UpdateById | PUT /admin/status_updates/{id} | # Update a status update |
StatusesApi | Get | GET /admin/statuses | # List statuses |
StatusesApi | GetById | GET /admin/statuses/{id} | # Retrieve statuses by id |
Suggestion_activity_entriesApi | Get | GET /admin/suggestion_activity_entries | # List suggestion activity entries |
SuggestionsApi | ApproveById | PUT /admin/suggestions/{id}/approve | |
SuggestionsApi | ConvertToTicketById | PUT /admin/suggestions/{id}/convert_to_ticket | |
SuggestionsApi | Create | POST /admin/suggestions | # Create a suggestion |
SuggestionsApi | DeleteById | DELETE /admin/suggestions/{id} | # Delete a suggestion |
SuggestionsApi | Get | GET /admin/suggestions | # List suggestions Returns a paginated list of suggestions. |
SuggestionsApi | GetById | GET /admin/suggestions/{id} | # Retrieve suggestions by id |
SuggestionsApi | Import | POST /admin/suggestions/import | # Create a suggestion |
SuggestionsApi | PublishById | PUT /admin/suggestions/{id}/publish | |
SuggestionsApi | SpamById | PUT /admin/suggestions/{id}/spam | |
SuggestionsApi | UnremoveById | PUT /admin/suggestions/{id}/unremove | |
SuggestionsApi | UpdateById | PUT /admin/suggestions/{id} | # Update a suggestion |
SupportersApi | Get | GET /admin/supporters | # List supporters |
SupportersApi | GetById | GET /admin/supporters/{id} | # Retrieve supporters by id |
UsersApi | BlockById | PUT /admin/users/{id}/block | |
UsersApi | Current | GET /admin/users/current | |
UsersApi | FindOrCreate | POST /admin/users/find_or_create | # Create an user |
UsersApi | Get | GET /admin/users | # List users |
UsersApi | GetById | GET /admin/users/{id} | # Retrieve users by id |
UsersApi | UnblockById | PUT /admin/users/{id}/unblock | |
ViewsApi | Create | POST /admin/views | # Create a view |
ViewsApi | DeleteById | DELETE /admin/views/{id} | # Delete a view |
ViewsApi | Get | GET /admin/views | # List views |
ViewsApi | GetById | GET /admin/views/{id} | # Retrieve views by id |
ViewsApi | UpdateById | PUT /admin/views/{id} | # Update a view |
- Models.Attachment
- Models.AttachmentLinks
- Models.AttachmentResponse
- Models.AttachmentResponsePaginated
- Models.BlacklistedIp
- Models.BulkAction
- Models.BulkActionLinks
- Models.Category
- Models.CategoryLinks
- Models.CategoryResponse
- Models.CategoryResponsePaginated
- Models.Comment
- Models.CommentLinks
- Models.CommentResponse
- Models.CommentResponsePaginated
- Models.CustomEmailDomain
- Models.CustomField
- Models.CustomFieldResponse
- Models.CustomFieldResponsePaginated
- Models.CustomerAccount
- Models.CustomerUser
- Models.CustomerUserLinks
- Models.EmailAlias
- Models.EmailAliasLinks
- Models.ExternalAccount
- Models.ExternalAccountResponse
- Models.ExternalAccountResponsePaginated
- Models.ExternalUser
- Models.ExternalUserLinks
- Models.ExternalUserResponse
- Models.ExternalUserResponsePaginated
- Models.Feature
- Models.FeatureLinks
- Models.FeatureResponse
- Models.FeatureResponsePaginated
- Models.Feedback
- Models.FeedbackLinks
- Models.FeedbackRanking
- Models.FeedbackRankingLinks
- Models.FeedbackResponse
- Models.FeedbackResponsePaginated
- Models.Forum
- Models.ForumInvitation
- Models.ForumInvitationLinks
- Models.ForumInvitationResponse
- Models.ForumInvitationResponsePaginated
- Models.ForumLinks
- Models.ForumResponse
- Models.ForumResponsePaginated
- Models.Label
- Models.LabelLinks
- Models.LabelResponse
- Models.LabelResponsePaginated
- Models.Merge
- Models.MergeLinks
- Models.Message
- Models.MessageResponse
- Models.MessageResponsePaginated
- Models.NPSRating
- Models.NPSRatingLinks
- Models.NPSRatingResponse
- Models.NPSRatingResponsePaginated
- Models.Note
- Models.NoteResponse
- Models.NoteResponsePaginated
- Models.Pagination
- Models.Permission
- Models.PermissionLinks
- Models.SmartvoteExperiment
- Models.SmartvoteExperimentLinks
- Models.SmartvoteExperimentSuggestion
- Models.SmartvoteExperimentSuggestionLinks
- Models.Status
- Models.StatusResponse
- Models.StatusResponsePaginated
- Models.StatusUpdate
- Models.StatusUpdateLinks
- Models.StatusUpdateResponse
- Models.StatusUpdateResponsePaginated
- Models.Subdomain
- Models.SubdomainLinks
- Models.Suggestion
- Models.SuggestionActivityEntry
- Models.SuggestionActivityEntryLinks
- Models.SuggestionActivityEntryResponse
- Models.SuggestionActivityEntryResponsePaginated
- Models.SuggestionLinks
- Models.SuggestionResponse
- Models.SuggestionResponsePaginated
- Models.Supporter
- Models.SupporterLinks
- Models.SupporterResponse
- Models.SupporterResponsePaginated
- Models.Team
- Models.Ticket
- Models.TicketLinks
- Models.Token
- Models.User
- Models.UserLinks
- Models.UserResponse
- Models.UserResponsePaginated
- Models.View
- Models.ViewLinks
- Models.ViewResponse
- Models.ViewResponsePaginated