Class: Clayful::Downloadable

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

Constant Summary collapse

@@name =
'Downloadable'
@@path =
'downloadables'

Class Method Summary collapse

Class Method Details

.count(*args) ⇒ Object



16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/models/downloadable.rb', line 16

def self.count(*args)

	Clayful.call_api({
		'model_name'       => @@name,
		'method_name'      => 'count',
		'http_method'      => 'GET',
		'path'             => '/v1/downloadables/count',
		'params'           => [],
		'args'             => args
	})

end

.create_download_url(*args) ⇒ Object



29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/models/downloadable.rb', line 29

def self.create_download_url(*args)

	Clayful.call_api({
		'model_name'       => @@name,
		'method_name'      => 'create_download_url',
		'http_method'      => 'POST',
		'path'             => '/v1/downloadables/{downloadableId}/url',
		'params'           => ['downloadableId', ],
		'without_payload'  => true,
		'args'             => args
	})

end

.get(*args) ⇒ Object



43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/models/downloadable.rb', line 43

def self.get(*args)

	Clayful.call_api({
		'model_name'       => @@name,
		'method_name'      => 'get',
		'http_method'      => 'GET',
		'path'             => '/v1/downloadables/{downloadableId}',
		'params'           => ['downloadableId', ],
		'args'             => args
	})

end

.list(*args) ⇒ Object



56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/models/downloadable.rb', line 56

def self.list(*args)

	Clayful.call_api({
		'model_name'       => @@name,
		'method_name'      => 'list',
		'http_method'      => 'GET',
		'path'             => '/v1/downloadables',
		'params'           => [],
		'args'             => args
	})

end

.nameObject



8
9
10
# File 'lib/models/downloadable.rb', line 8

def self.name
	@@name
end

.pathObject



12
13
14
# File 'lib/models/downloadable.rb', line 12

def self.path
	@@path
end