Skip to content

Commit

Permalink
Update core.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
papo2608 authored Nov 13, 2018
1 parent a06417e commit 1e2d3d1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/poeditor/core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -58,14 +59,16 @@ def pull()
# @param language [String]
# @param type [String]
# @param tags [Array<String>]
# @param filters [Array<String>]
#
# @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)
Expand Down

0 comments on commit 1e2d3d1

Please sign in to comment.