Class GitlabApiConnector
- Namespace
- MES.MQC.DataSourceLibrary.Adapters.Apis
- Assembly
- MES.MQC.DataSourceLibrary.dll
public abstract class GitlabApiConnector : ApiConnector, IFormProvider
- Inheritance
-
GitlabApiConnector
- Implements
- Derived
- Inherited Members
Methods
ConfigureForm(IForm, string[])
ConfigureForm can be implemented by an API adapter. It is used to modify the FormSchema of the Add/Edit DataSource dialog for the AdapterConfiguration depending on the values entered (e.g. to make options or input fields visible and/or deactivate them based on a correct API request). It is called for the initial creation of the FormSchema with all fields as modified and when a field that was enabled by RefreshOnModified has been changed by the user. This method should also validate the configuration, not if the schema is valid, but if the values are usable (e.g. if the api is accessible and the authentification is valid).
public override FormError[] ConfigureForm(IForm form, string[] modifiedFields)
Parameters
formIFormIForm, the AdapterConfiguration
modifiedFieldsstring[]Array of the modified fields as string (Form-Subfields as field.field or field.index.field)
Returns
- FormError[]
Array of FormError, if a validation failed
GetClient(ApiConnectorContext, bool)
protected RestClient GetClient(ApiConnectorContext context, bool checkAuth = false)
Parameters
contextApiConnectorContextcheckAuthbool
Returns
- RestClient
GetClient(GitlabConfiguration, out List<FormError>, bool)
protected RestClient GetClient(GitlabApiConnector.GitlabConfiguration configuration, out List<FormError> errors, bool checkAuth = false)
Parameters
configurationGitlabApiConnector.GitlabConfigurationerrorsList<FormError>checkAuthbool
Returns
- RestClient
Request<T>(RestClient, RestRequest)
protected T[] Request<T>(RestClient client, RestRequest request)
Parameters
clientRestClientrequestRestRequest
Returns
- T[]
Type Parameters
T
Request<T>(RestClient, RestRequest, out RestResponse, int, int?)
protected T[] Request<T>(RestClient client, RestRequest request, out RestResponse response, int page = 1, int? limit = null)
Parameters
Returns
- T[]
Type Parameters
T