Skip to content

Latest commit

 

History

History
447 lines (354 loc) · 15.4 KB

Status_updatesApi.md

File metadata and controls

447 lines (354 loc) · 15.4 KB

UserVoiceSdk.Api.Status_updatesApi

Method HTTP request Description
Create POST /admin/status_updates # Create a status update
DeleteById DELETE /admin/status_updates/{id} # Delete a status update
Get GET /admin/status_updates # List status updates
GetById GET /admin/status_updates/{id} # Retrieve status updates by id
UpdateById PUT /admin/status_updates/{id} # Update a status update

Create

StatusUpdateResponse Create (string body, long? linksSuggestion, bool? notifySupporters = null, string notificationEmailAddress = null, long? linksStatus = null, List includes = null)

Create a status update

Example

using System;
using System.Diagnostics;
using UserVoiceSdk.Api;
using UserVoiceSdk.Client;
using UserVoiceSdk.Models;

namespace Example
{
    public class CreateExample
    {
        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 body = body_example;  // string | 
            var linksSuggestion = 789;  // long? | 
            var notifySupporters = true;  // bool? |  (optional)  (default to false)
            var notificationEmailAddress = notificationEmailAddress_example;  // string |  (optional) 
            var linksStatus = 789;  // long? |  (optional) 
            var includes = new List<string>(); // List<string> |  (optional) 

            try
            {
                // # Create a status update
                StatusUpdateResponse result = client.Status_updates.Create(body, linksSuggestion, notifySupporters, notificationEmailAddress, linksStatus, 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 Status_updatesApi.Create: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
body string
linksSuggestion long?
notifySupporters bool? [optional] [default to false]
notificationEmailAddress string [optional]
linksStatus long? [optional]
includes List [optional]

Return type

StatusUpdateResponse

Authorization

oauth2_password, oauth2_client_credentials

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeleteById

StatusUpdateResponse DeleteById (long? id, List includes = null)

Delete a status update

Example

using System;
using System.Diagnostics;
using UserVoiceSdk.Api;
using UserVoiceSdk.Client;
using UserVoiceSdk.Models;

namespace Example
{
    public class DeleteByIdExample
    {
        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 id = 789;  // long? | 
            var includes = new List<string>(); // List<string> |  (optional) 

            try
            {
                // # Delete a status update
                StatusUpdateResponse result = client.Status_updates.DeleteById(id, 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 Status_updatesApi.DeleteById: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
id long?
includes List [optional]

Return type

StatusUpdateResponse

Authorization

oauth2_password, oauth2_client_credentials

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

Get

StatusUpdateResponsePaginated Get (long? page = null, long? perPage = null, string sort = null, List<int?> suggestion = null, List includes = null)

List status updates

Example

using System;
using System.Diagnostics;
using UserVoiceSdk.Api;
using UserVoiceSdk.Client;
using UserVoiceSdk.Models;

namespace Example
{
    public class GetExample
    {
        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 page = 789;  // long? |  (optional)  (default to 1)
            var perPage = 789;  // long? |  (optional)  (default to 20)
            var sort = sort_example;  // string |  (optional)  (default to -id)
            var suggestion = new List<int?>(); // List<int?> |  (optional) 
            var includes = new List<string>(); // List<string> |  (optional) 

            try
            {
                // # List status updates
                StatusUpdateResponsePaginated result = client.Status_updates.Get(page, perPage, sort, suggestion, 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 Status_updatesApi.Get: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
page long? [optional] [default to 1]
perPage long? [optional] [default to 20]
sort string [optional] [default to -id]
suggestion List<int?> [optional]
includes List [optional]

Return type

StatusUpdateResponsePaginated

Authorization

oauth2_password, oauth2_client_credentials

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetById

StatusUpdateResponse GetById (List<int?> id, List includes = null)

Retrieve status updates by id

Example

using System;
using System.Diagnostics;
using UserVoiceSdk.Api;
using UserVoiceSdk.Client;
using UserVoiceSdk.Models;

namespace Example
{
    public class GetByIdExample
    {
        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 id = new List<int?>(); // List<int?> | 
            var includes = new List<string>(); // List<string> |  (optional) 

            try
            {
                // # Retrieve status updates by id
                StatusUpdateResponse result = client.Status_updates.GetById(id, 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 Status_updatesApi.GetById: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
id List<int?>
includes List [optional]

Return type

StatusUpdateResponse

Authorization

oauth2_password, oauth2_client_credentials

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdateById

StatusUpdateResponse UpdateById (long? id, string body, List includes = null)

Update a status update

Example

using System;
using System.Diagnostics;
using UserVoiceSdk.Api;
using UserVoiceSdk.Client;
using UserVoiceSdk.Models;

namespace Example
{
    public class UpdateByIdExample
    {
        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 id = 789;  // long? | 
            var body = body_example;  // string | 
            var includes = new List<string>(); // List<string> |  (optional) 

            try
            {
                // # Update a status update
                StatusUpdateResponse result = client.Status_updates.UpdateById(id, body, 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 Status_updatesApi.UpdateById: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
id long?
body string
includes List [optional]

Return type

StatusUpdateResponse

Authorization

oauth2_password, oauth2_client_credentials

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]