Class: Zedkit::Projects::Locales

Inherits:
Object
  • Object
show all
Defined in:
lib/zedlocales/projects.rb

Class Method Summary collapse

Class Method Details

.create(zks = {}, &block) ⇒ Object



34
35
36
# File 'lib/zedlocales/projects.rb', line 34

def create(zks = {}, &block)
  Zedkit::Client.crud(:create, "projects/#{zks[:project][:uuid]}/locales", zks, %w(project), &block)
end

.delete(zks = {}, &block) ⇒ Object



43
44
45
# File 'lib/zedlocales/projects.rb', line 43

def delete(zks = {}, &block)
  Zedkit::Client.crud(:delete, "projects/#{zks[:project][:uuid]}/locales/#{zks[:locale][:code]}", zks, [], &block)
end

.get(zks = {}, &block) ⇒ Object



30
31
32
# File 'lib/zedlocales/projects.rb', line 30

def get(zks = {}, &block)
  Zedkit::Client.crud(:get, "projects/#{zks[:project][:uuid]}/locales", zks, %w(project), &block)
end

.update(zks = {}, &block) ⇒ Object



38
39
40
41
# File 'lib/zedlocales/projects.rb', line 38

def update(zks = {}, &block)
  Zedkit::Client.crud(:update,
                      "projects/#{zks[:project][:uuid]}/locales/#{zks[:locale][:code]}", zks, %w(project), &block)
end