Class: Serwersms::Files

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

Instance Method Summary collapse

Constructor Details

#initialize(obj) ⇒ Files

Returns a new instance of Files.



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

def initialize(obj)
    @serwersms = obj
end

Instance Method Details

#add(type, params = {}) ⇒ Object



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

def add(type, params = {})
  params['type']  = type
  @serwersms.call('files/add',params);
end

#delete(id, type) ⇒ Object



67
68
69
70
71
72
# File 'lib/library/files.rb', line 67

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

#index(type) ⇒ Object



34
35
36
37
38
# File 'lib/library/files.rb', line 34

def index(type)
  params = {}
  params['type']  = type
  @serwersms.call('files/index',params);
end

#view(id, type) ⇒ Object



52
53
54
55
56
57
# File 'lib/library/files.rb', line 52

def view(id,type)
  params = {}
  params['id']    = id
  params['type']  = type
  @serwersms.call('files/view',params);
end