/// <summary> /// Checks service is alive /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <object> IsAliveAsync(this IResourcesAPI operations, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.IsAliveWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets section of text resources /// </summary> /// <remarks> /// Returns text resources in the specified section, for example: lykke.ios /// will return all text resources under this section (lykke.ios.text, /// lykke.ios.title etc.) /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='lang'> /// language /// </param> /// <param name='name'> /// full name of the section /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <object> GetTextResourceSectionAsync(this IResourcesAPI operations, string lang, string name, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetTextResourceSectionWithHttpMessagesAsync(lang, name, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets all text resources /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IList <TextResource> > GetAllTextResourcesAsync(this IResourcesAPI operations, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetAllTextResourcesWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets image resource by name /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='name'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <string> GetImageResourceAsync(this IResourcesAPI operations, string name, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetImageResourceWithHttpMessagesAsync(name, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Adds group resources /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='model'> /// list of group resources /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ErrorResponse> AddGroupResourcesAsync(this IResourcesAPI operations, GroupResourcesModel model = default(GroupResourcesModel), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.AddGroupResourcesWithHttpMessagesAsync(model, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Deletes language by code /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='code'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ErrorResponse> DeleteLanguageAsync(this IResourcesAPI operations, string code, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.DeleteLanguageWithHttpMessagesAsync(code, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets section of text resources /// </summary> /// <remarks> /// Returns text resources in the specified section, for example: lykke.ios /// will return all text resources under this section (lykke.ios.text, /// lykke.ios.title etc.) /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='lang'> /// language /// </param> /// <param name='name'> /// full name of the section /// </param> public static object GetTextResourceSection(this IResourcesAPI operations, string lang, string name) { return(operations.GetTextResourceSectionAsync(lang, name).GetAwaiter().GetResult()); }
/// <summary> /// Adds group resources /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='model'> /// list of group resources /// </param> public static ErrorResponse AddGroupResources(this IResourcesAPI operations, GroupResourcesModel model = default(GroupResourcesModel)) { return(operations.AddGroupResourcesAsync(model).GetAwaiter().GetResult()); }
/// <summary> /// Adds text resource /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='model'> /// text resource model /// </param> public static ErrorResponse AddTextResource(this IResourcesAPI operations, TextResourceModel model = default(TextResourceModel)) { return(operations.AddTextResourceAsync(model).GetAwaiter().GetResult()); }
/// <summary> /// Gets all text resources /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static IList <TextResource> GetAllTextResources(this IResourcesAPI operations) { return(operations.GetAllTextResourcesAsync().GetAwaiter().GetResult()); }
/// <summary> /// Gets image resource by name /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='name'> /// </param> public static string GetImageResource(this IResourcesAPI operations, string name) { return(operations.GetImageResourceAsync(name).GetAwaiter().GetResult()); }
/// <summary> /// Deletes language by code /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='code'> /// </param> public static ErrorResponse DeleteLanguage(this IResourcesAPI operations, string code) { return(operations.DeleteLanguageAsync(code).GetAwaiter().GetResult()); }
/// <summary> /// Adds language /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='model'> /// language model /// </param> public static ErrorResponse AddLanguage(this IResourcesAPI operations, Language model = default(Language)) { return(operations.AddLanguageAsync(model).GetAwaiter().GetResult()); }
/// <summary> /// Checks service is alive /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static object IsAlive(this IResourcesAPI operations) { return(operations.IsAliveAsync().GetAwaiter().GetResult()); }
/// <summary> /// Delete image resource by name /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='name'> /// </param> public static ErrorResponse DeleteImageResource(this IResourcesAPI operations, string name) { return(operations.DeleteImageResourceAsync(name).GetAwaiter().GetResult()); }
/// <summary> /// Deletes group resource /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='model'> /// </param> public static ErrorResponse DeleteGroupResource(this IResourcesAPI operations, DeleteGroupResourceModel model = default(DeleteGroupResourceModel)) { return(operations.DeleteGroupResourceAsync(model).GetAwaiter().GetResult()); }
/// <summary> /// Gets group resource by name /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='name'> /// full name of the resource /// </param> public static object GetGroupResource(this IResourcesAPI operations, string name) { return(operations.GetGroupResourceAsync(name).GetAwaiter().GetResult()); }