Class: Dsapi::Client

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

Instance Method Summary collapse

Instance Method Details

#delete_dataset(uuid:) ⇒ Object



38
39
40
# File 'lib/dsapi/client.rb', line 38

def delete_dataset(uuid:)
  Dsapi::Transactions::DeleteDataset.new.call(uuid: uuid)
end

#get_asset(_path:) ⇒ Object

Raises:

  • (NotImplementedError)


29
30
31
# File 'lib/dsapi/client.rb', line 29

def get_asset(_path:)
  raise NotImplementedError
end

#get_dataset(uuid:) ⇒ Object



21
22
23
# File 'lib/dsapi/client.rb', line 21

def get_dataset(uuid:)
  Dsapi::Transactions::GetDataset.new.call(uuid: uuid)
end

#get_dataset_file(id:, path:) ⇒ Object



25
26
27
# File 'lib/dsapi/client.rb', line 25

def get_dataset_file(id:, path:)
  Dsapi::Transactions::GetDatasetFile.new.call(id: id, path: path)
end

#get_datasetsObject



17
18
19
# File 'lib/dsapi/client.rb', line 17

def get_datasets
  Dsapi::Transactions::GetDatasets.new.call
end

#get_documentationObject



42
43
44
45
46
47
48
49
50
51
# File 'lib/dsapi/client.rb', line 42

def get_documentation
  Dsapi::Transactions::GetDocumentation.new.call do |m|
    m.success do |documentation|
      documentation
    end
    m.failure do
      nil
    end
  end
end

#pingObject



53
54
55
56
57
58
59
60
61
62
# File 'lib/dsapi/client.rb', line 53

def ping
  Dsapi::Transactions::Ping.new.call do |m|
    m.success do |pong|
      pong
    end
    m.failure do
      nil
    end
  end
end

#put_dataset(uuid:) ⇒ Object



34
35
36
# File 'lib/dsapi/client.rb', line 34

def put_dataset(uuid:)
  Dsapi::Transactions::PutDataset.new.call(uuid: uuid)
end