class Phraseapp::Rest::Resource::Locale
Public Class Methods
new(client:, project_id:)
click to toggle source
# File lib/phraseapp-rest/resource/locale.rb, line 13 def initialize(client:, project_id:) @client = client @path = "/projects/#{project_id}/locales" end
Public Instance Methods
download(id:, params: Phraseapp::Rest::Parameter::Download.new)
click to toggle source
# File lib/phraseapp-rest/resource/locale.rb, line 22 def download(id:, params: Phraseapp::Rest::Parameter::Download.new) path = "#{@path}/#{id}/download" path += "?#{params}" unless params.nil? @client.get(path) end
get(id:)
click to toggle source
# File lib/phraseapp-rest/resource/locale.rb, line 18 def get(id:) Parser.parse(@client.get("#{@path}/#{id}")) end