Skip to content

Repository files navigation

UserVoiceSdk - the C# library for the UserVoice API

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

Note to consumers

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!

Frameworks supported

  • .NET 4.0 or later
  • Windows Phone 7.1 (Mango)

Dependencies

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

Installation

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:

usingUserVoiceSdk.Api;usingUserVoiceSdk.Client;usingUserVoiceSdk.Models;

Getting Started

usingSystem;usingSystem.Diagnostics;usingUserVoiceSdk.Api;usingUserVoiceSdk.Client;usingUserVoiceSdk.Models;namespaceExample{publicclassAttachmentsExample{privatestringApiKey="some_key";privatestringApiSecret="some_secret";privatestringSubdomain="sub";privatestringDomain="uservoice.com";// Credentials for authenticating as a userprivatestringUsername="some.user@uservoice.com";privatestringPassword="Somepassword1234!";publicvoidmain(){varclient=newApiClient(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);varfile=newSystem.IO.Stream();// System.IO.Stream | varincludes=newList<string>();// List<string> | (optional) try{// AttachmentResponseresult=client.Attachments.Create(file,includes);Debug.WriteLine(result);}catch(RateLimitExceptionrle){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(ApiExceptione){Debug.Print("Exception when calling AttachmentsApi.Create: "+e.Message);}}}}

Documentation for API Endpoints

ClassMethodHTTP requestDescription
AttachmentsApiCreatePOST /admin/attachments
AttachmentsApiDeleteByIdDELETE /admin/attachments/{id}# Delete an attachment
AttachmentsApiGetGET /admin/attachments# List attachments
AttachmentsApiGetByIdGET /admin/attachments/{id}# Retrieve attachments by id
CategoriesApiCreatePOST /admin/categories# Create a category
CategoriesApiDeleteByIdDELETE /admin/categories/{id}# Delete a category
CategoriesApiGetGET /admin/categories# List categories
CategoriesApiGetByIdGET /admin/categories/{id}# Retrieve categories by id
CategoriesApiUpdateByIdPUT /admin/categories/{id}# Update a category
CommentsApiApproveByIdPUT /admin/comments/{id}/approve
CommentsApiCreatePOST /admin/comments# Create a comment
CommentsApiDeleteByIdDELETE /admin/comments/{id}# Delete a comment
CommentsApiGetGET /admin/comments# List comments
CommentsApiGetByIdGET /admin/comments/{id}# Retrieve comments by id
CommentsApiSpamByIdPUT /admin/comments/{id}/spam
CommentsApiUnremoveByIdPUT /admin/comments/{id}/unremove
Custom_fieldsApiCreatePOST /admin/custom_fields# Create a custom field
Custom_fieldsApiDeleteByIdDELETE /admin/custom_fields/{id}# Delete a custom field
Custom_fieldsApiGetGET /admin/custom_fields# List custom fields
Custom_fieldsApiGetByIdGET /admin/custom_fields/{id}# Retrieve custom fields by id
Custom_fieldsApiUpdateByIdPUT /admin/custom_fields/{id}# Update a custom field
External_accountsApiBulkDeleteDELETE /admin/external_accounts/bulk_delete# Bulk delete external accounts by ID
External_accountsApiBulkDeleteByExternalIdDELETE /admin/external_accounts/bulk_delete_by_external_id# Bulk delete external accounts by external ID
External_accountsApiGetGET /admin/external_accounts# List external accounts
External_accountsApiGetByIdGET /admin/external_accounts/{id}# Retrieve external accounts by id
External_accountsApiImportPOST /admin/external_accounts/import
External_usersApiBulkDeleteDELETE /admin/external_users/bulk_delete# Bulk delete external users by ID
External_usersApiBulkDeleteByExternalIdDELETE /admin/external_users/bulk_delete_by_external_id# Bulk delete external users by external ID
External_usersApiGetGET /admin/external_users# List external users
External_usersApiGetByIdGET /admin/external_users/{id}# Retrieve external users by id
External_usersApiImportPOST /admin/external_users/import# Import external users
FeaturesApiCreatePOST /admin/features# Create a feature
FeaturesApiDeleteByIdDELETE /admin/features/{id}# Delete a feature
FeaturesApiGetGET /admin/features# List features
FeaturesApiGetByIdGET /admin/features/{id}# Retrieve features by id
FeaturesApiUpdateByIdPUT /admin/features/{id}# Update a feature
FeedbackApiCreatePOST /admin/feedback# Create a feedback
FeedbackApiDeleteByIdDELETE /admin/feedback/{id}# Delete a feedback
FeedbackApiGetGET /admin/feedback# List feedback
FeedbackApiGetByIdGET /admin/feedback/{id}# Retrieve feedback by id
FeedbackApiUpdateByIdPUT /admin/feedback/{id}# Update a feedback
Forum_invitationsApiCreatePOST /admin/forum_invitations# Create a forum invitation
Forum_invitationsApiDeleteByIdDELETE /admin/forum_invitations/{id}# Delete a forum invitation
Forum_invitationsApiGetGET /admin/forum_invitations# List forum invitations
Forum_invitationsApiGetByIdGET /admin/forum_invitations/{id}# Retrieve forum invitations by id
ForumsApiGetGET /admin/forums# List forums
ForumsApiGetByIdGET /admin/forums/{id}# Retrieve forums by id
IdentityApiBulkIdentifyPOST /admin/bulk_identify# Add or update traits for a batch of users.
LabelsApiAttachPOST /admin/labels/attach# Create a label
LabelsApiCreatePOST /admin/labels# Create a label
LabelsApiDeleteByIdDELETE /admin/labels/{id}# Delete a label
LabelsApiDetachPOST /admin/labels/detach# Create a label
LabelsApiGetGET /admin/labels# List labels
LabelsApiGetByIdGET /admin/labels/{id}# Retrieve labels by id
LabelsApiUpdateByIdPUT /admin/labels/{id}# Update a label
MessagesApiCreatePOST /admin/messages# Create a message
MessagesApiGetGET /admin/messages# List messages
MessagesApiGetByIdGET /admin/messages/{id}# Retrieve messages by id
NotesApiCreatePOST /admin/notes# Create a note
NotesApiGetGET /admin/notes# List notes
NotesApiGetByIdGET /admin/notes/{id}# Retrieve notes by id
NotesApiUpdateByIdPUT /admin/notes/{id}# Update a note
Nps_ratingsApiCreatePOST /admin/nps_ratings# Create a nps rating
Nps_ratingsApiGetGET /admin/nps_ratings# List nps ratings
Nps_ratingsApiGetByIdGET /admin/nps_ratings/{id}# Retrieve nps ratings by id
OauthApiGetOauthTokenPOST /oauth/token
Status_updatesApiCreatePOST /admin/status_updates# Create a status update
Status_updatesApiDeleteByIdDELETE /admin/status_updates/{id}# Delete a status update
Status_updatesApiGetGET /admin/status_updates# List status updates
Status_updatesApiGetByIdGET /admin/status_updates/{id}# Retrieve status updates by id
Status_updatesApiUpdateByIdPUT /admin/status_updates/{id}# Update a status update
StatusesApiGetGET /admin/statuses# List statuses
StatusesApiGetByIdGET /admin/statuses/{id}# Retrieve statuses by id
Suggestion_activity_entriesApiGetGET /admin/suggestion_activity_entries# List suggestion activity entries
SuggestionsApiApproveByIdPUT /admin/suggestions/{id}/approve
SuggestionsApiConvertToTicketByIdPUT /admin/suggestions/{id}/convert_to_ticket
SuggestionsApiCreatePOST /admin/suggestions# Create a suggestion
SuggestionsApiDeleteByIdDELETE /admin/suggestions/{id}# Delete a suggestion
SuggestionsApiGetGET /admin/suggestions# List suggestions Returns a paginated list of suggestions.
SuggestionsApiGetByIdGET /admin/suggestions/{id}# Retrieve suggestions by id
SuggestionsApiImportPOST /admin/suggestions/import# Create a suggestion
SuggestionsApiPublishByIdPUT /admin/suggestions/{id}/publish
SuggestionsApiSpamByIdPUT /admin/suggestions/{id}/spam
SuggestionsApiUnremoveByIdPUT /admin/suggestions/{id}/unremove
SuggestionsApiUpdateByIdPUT /admin/suggestions/{id}# Update a suggestion
SupportersApiGetGET /admin/supporters# List supporters
SupportersApiGetByIdGET /admin/supporters/{id}# Retrieve supporters by id
UsersApiBlockByIdPUT /admin/users/{id}/block
UsersApiCurrentGET /admin/users/current
UsersApiFindOrCreatePOST /admin/users/find_or_create# Create an user
UsersApiGetGET /admin/users# List users
UsersApiGetByIdGET /admin/users/{id}# Retrieve users by id
UsersApiUnblockByIdPUT /admin/users/{id}/unblock
ViewsApiCreatePOST /admin/views# Create a view
ViewsApiDeleteByIdDELETE /admin/views/{id}# Delete a view
ViewsApiGetGET /admin/views# List views
ViewsApiGetByIdGET /admin/views/{id}# Retrieve views by id
ViewsApiUpdateByIdPUT /admin/views/{id}# Update a view

Documentation for Models

About

New api/v2-based, swagger-generated C# client library

Resources

Stars

3 stars

Watchers

22 watching

Forks

Releases

Packages

Used by

Contributors

Languages