Skip to content

Latest commit

 

History

History
447 lines (353 loc) · 16.4 KB

External_accountsApi.md

File metadata and controls

447 lines (353 loc) · 16.4 KB

UserVoiceSdk.Api.External_accountsApi

Method HTTP request Description
BulkDelete DELETE /admin/external_accounts/bulk_delete # Bulk delete external accounts by ID
BulkDeleteByExternalId DELETE /admin/external_accounts/bulk_delete_by_external_id # Bulk delete external accounts by external ID
Get GET /admin/external_accounts # List external accounts
GetById GET /admin/external_accounts/{id} # Retrieve external accounts by id
Import POST /admin/external_accounts/import

BulkDelete

ExternalAccountResponse BulkDelete (List<int?> ids)

Bulk delete external accounts by ID

Example

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

namespace Example
{
    public class BulkDeleteExample
    {
        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 ids = new List<int?>(); // List<int?> | 

            try
            {
                // # Bulk delete external accounts by ID
                ExternalAccountResponse result = client.External_accounts.BulkDelete(ids);
                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 External_accountsApi.BulkDelete: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
ids List<int?>

Return type

ExternalAccountResponse

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]

BulkDeleteByExternalId

ExternalAccountResponse BulkDeleteByExternalId (List externalIds)

Bulk delete external accounts by external ID

Example

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

namespace Example
{
    public class BulkDeleteByExternalIdExample
    {
        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 externalIds = new List<string>(); // List<string> | 

            try
            {
                // # Bulk delete external accounts by external ID
                ExternalAccountResponse result = client.External_accounts.BulkDeleteByExternalId(externalIds);
                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 External_accountsApi.BulkDeleteByExternalId: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
externalIds List

Return type

ExternalAccountResponse

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

ExternalAccountResponsePaginated Get (long? page = null, long? perPage = null, string sort = null, List externalId = null, List<int?> suggestion = null, List<int?> feature = null, string q = null)

List external accounts

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 -last_active_at)
            var externalId = new List<string>(); // List<string> |  (optional) 
            var suggestion = new List<int?>(); // List<int?> |  (optional) 
            var feature = new List<int?>(); // List<int?> |  (optional) 
            var q = q_example;  // string |  (optional) 

            try
            {
                // # List external accounts
                ExternalAccountResponsePaginated result = client.External_accounts.Get(page, perPage, sort, externalId, suggestion, feature, q);
                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 External_accountsApi.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 -last_active_at]
externalId List [optional]
suggestion List<int?> [optional]
feature List<int?> [optional]
q string [optional]

Return type

ExternalAccountResponsePaginated

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

ExternalAccountResponse GetById (List<int?> id)

Retrieve external accounts 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?> | 

            try
            {
                // # Retrieve external accounts by id
                ExternalAccountResponse result = client.External_accounts.GetById(id);
                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 External_accountsApi.GetById: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
id List<int?>

Return type

ExternalAccountResponse

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]

Import

ExternalAccountResponse Import (List accounts, string accountsIExternalId, string accountsIName = null, string accountsIPlan = null, long? accountsIMrrCents = null, long? accountsILtvCents = null, DateTime? accountsIExternalCreatedAt = null, string accountsICustomFields = null)

Example

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

namespace Example
{
    public class ImportExample
    {
        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 accounts = new List<string>(); // List<string> | Each element with index i has these fields:
            var accountsIExternalId = accountsIExternalId_example;  // string | Account ID in your system.
            var accountsIName = accountsIName_example;  // string | Account name in your system. Recommended length: 128 or fewer characters. (optional) 
            var accountsIPlan = accountsIPlan_example;  // string | Plan name of account. Recommended length: 128 or fewer characters. (optional) 
            var accountsIMrrCents = 789;  // long? |  (optional) 
            var accountsILtvCents = 789;  // long? |  (optional) 
            var accountsIExternalCreatedAt = 2013-10-20;  // DateTime? |  (optional) 
            var accountsICustomFields = accountsICustomFields_example;  // string |  (optional) 

            try
            {
                // 
                ExternalAccountResponse result = client.External_accounts.Import(accounts, accountsIExternalId, accountsIName, accountsIPlan, accountsIMrrCents, accountsILtvCents, accountsIExternalCreatedAt, accountsICustomFields);
                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 External_accountsApi.Import: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
accounts List Each element with index i has these fields:
accountsIExternalId string Account ID in your system.
accountsIName string Account name in your system. Recommended length: 128 or fewer characters. [optional]
accountsIPlan string Plan name of account. Recommended length: 128 or fewer characters. [optional]
accountsIMrrCents long? [optional]
accountsILtvCents long? [optional]
accountsIExternalCreatedAt DateTime? [optional]
accountsICustomFields string [optional]

Return type

ExternalAccountResponse

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]