Module: Seeds

Included in:
Config
Defined in:
lib/user/config/seeds.rb

Instance Method Summary collapse

Instance Method Details

#apply_seeds(data, async = false) ⇒ Object

Apply seeds.

Apply seeds.

Example


11
12
13
14
15
# File 'lib/user/config/seeds.rb', line 11

def apply_seeds(data, async = false)
    url = "/config/seeds"
    url = "#{url}?async" if async
    @client.raw("post", url, nil, data)
end

#get_seed_process(id, options = nil) ⇒ Object

Get seed process.

Get a seed process info.

Parameters

id

(Integer) – Story version id.

options

(Hash) – List of Resource Collection Options shown above can be used as parameter.

First Example

@data = @mints_user.get_story_version(1)

Second Example

options = {
  "fields": "id, title"
}
@data = @mints_user.get_seed_process(1, options)

51
52
53
# File 'lib/user/config/seeds.rb', line 51

def get_seed_process(id, options = nil)
    @client.raw("get", "/config/seed-processes/#{id}", options)
end

#get_seed_processes(options = nil) ⇒ Object

Get seed processes.

Get a collection of seed processes.

Parameters

options

(Hash) – List of Resource Collection Options shown above can be used as parameter.

use_post

(Boolean) – Variable to determine if the request is by ‘post’ or ‘get’ functions.

First Example

@data = @mints_user.get_seed_processes

Second Example

options = {
  "fields": "id"
}
@data = @mints_user.get_seed_processes(options)

32
33
34
# File 'lib/user/config/seeds.rb', line 32

def get_seed_processes(options = nil)
    @client.raw("post", "/config/seed-processes", options)
end