Class: Serwersms::Templates

Inherits:
Object
  • Object
show all
Defined in:
lib/library/templates.rb

Instance Method Summary collapse

Constructor Details

#initialize(obj) ⇒ Templates

Returns a new instance of Templates.



2
3
4
# File 'lib/library/templates.rb', line 2

def initialize(obj)
    @serwersms = obj
end

Instance Method Details

#add(name, text) ⇒ Object



31
32
33
34
35
36
# File 'lib/library/templates.rb', line 31

def add(name, text)
  params = {}
  params['name']   = name
  params['text']   = text
  @serwersms.call('templates/add',params);
end

#delete(id) ⇒ Object



63
64
65
66
67
# File 'lib/library/templates.rb', line 63

def delete(id)
  params = {}
  params['id'] = id
  @serwersms.call('templates/delete',params);
end

#edit(id, name, text) ⇒ Object



48
49
50
51
52
53
54
# File 'lib/library/templates.rb', line 48

def edit(id,name, text)
  params = {}
  params['id']       = id
  params['name']     = name
  params['text']     = text
  @serwersms.call('templates/edit',params);
end

#index(params = {}) ⇒ Object



17
18
19
# File 'lib/library/templates.rb', line 17

def index(params = {} )
  @serwersms.call('templates/index',params);
end