From 1e2d3d17f16f940cdfdae2c8f53b18ee62191162 Mon Sep 17 00:00:00 2001 From: papo2608 Date: Tue, 13 Nov 2018 19:12:20 +0100 Subject: [PATCH] Update core.rb --- lib/poeditor/core.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/poeditor/core.rb b/lib/poeditor/core.rb index 037840c..d650acd 100644 --- a/lib/poeditor/core.rb +++ b/lib/poeditor/core.rb @@ -40,7 +40,8 @@ def pull() :project_id => @configuration.project_id, :language => language, :type => @configuration.type, - :tags => @configuration.tags) + :tags => @configuration.tags, + :filters => @configuration.filters) write(language, content) for alias_to, alias_from in @configuration.language_alias @@ -58,14 +59,16 @@ def pull() # @param language [String] # @param type [String] # @param tags [Array] + # @param filters [Array] # # @return Downloaded translation content - def export(api_key:, project_id:, language:, type:, tags:nil) + def export(api_key:, project_id:, language:, type:, tags:nil, filters:nil) options = { "id" => project_id, "language" => convert_to_poeditor_language(language), "type" => type, "tags" => (tags || []).join(","), + "filters" => (filters || []).join(","), } response = self.api("export", api_key, options) data = JSON(response.body)