Class: Source

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

Instance Method Summary collapse

Constructor Details

#initialize(clientw) ⇒ Source

Returns a new instance of Source.



5
6
7
# File 'lib/source.rb', line 5

def initialize(clientw)
    @clientw = clientw
end

Instance Method Details

#get(source_id) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/source.rb', line 14

def get(source_id)
    query = {
        "source_id" => source_id
    }
    resp = @clientw.get("source", query)
    return resp['data']
end

#listObject



9
10
11
12
# File 'lib/source.rb', line 9

def list()
    resp = @clientw.get("sources")
    return resp['data']
end