Class: MagicWrite::Ingestions

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

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Ingestions

Returns a new instance of Ingestions.



3
4
5
# File 'lib/magicwrite/ingestions.rb', line 3

def initialize(client:)
  @client = client
end

Instance Method Details

#create(parameters: {}) ⇒ Object



11
12
13
# File 'lib/magicwrite/ingestions.rb', line 11

def create(parameters: {})
  client.json_post(path: '/ingestions', parameters: parameters)
end

#delete(id:) ⇒ Object



19
20
21
# File 'lib/magicwrite/ingestions.rb', line 19

def delete(id:)
  client.delete(path: "/ingestions/#{id}")
end

#list(parameters: {}) ⇒ Object



7
8
9
# File 'lib/magicwrite/ingestions.rb', line 7

def list(parameters: {})
  client.get(path: '/ingestions', parameters: parameters)
end

#retrieve(id:) ⇒ Object



15
16
17
# File 'lib/magicwrite/ingestions.rb', line 15

def retrieve(id:)
  client.get(path: "/ingestions/#{id}")
end