Class: Clayful::Group
- Inherits:
-
Object
- Object
- Clayful::Group
- Defined in:
- lib/models/group.rb
Constant Summary collapse
- @@name =
'Group'
- @@path =
'groups'
Class Method Summary collapse
- .count(*args) ⇒ Object
- .delete_metafield(*args) ⇒ Object
- .get(*args) ⇒ Object
- .increase_metafield(*args) ⇒ Object
- .list(*args) ⇒ Object
- .name ⇒ Object
- .path ⇒ Object
- .pull_from_metafield(*args) ⇒ Object
- .push_to_metafield(*args) ⇒ Object
Class Method Details
.count(*args) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/models/group.rb', line 16 def self.count(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'count', 'http_method' => 'GET', 'path' => '/v1/groups/count', 'params' => [], 'args' => args }) end |
.delete_metafield(*args) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/models/group.rb', line 29 def self.(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'delete_metafield', 'http_method' => 'DELETE', 'path' => '/v1/groups/{groupId}/meta/{field}', 'params' => ['groupId', 'field', ], 'args' => args }) end |
.get(*args) ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/models/group.rb', line 42 def self.get(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'get', 'http_method' => 'GET', 'path' => '/v1/groups/{groupId}', 'params' => ['groupId', ], 'args' => args }) end |
.increase_metafield(*args) ⇒ Object
55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/models/group.rb', line 55 def self.(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'increase_metafield', 'http_method' => 'POST', 'path' => '/v1/groups/{groupId}/meta/{field}/inc', 'params' => ['groupId', 'field', ], 'args' => args }) end |
.list(*args) ⇒ Object
68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/models/group.rb', line 68 def self.list(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'list', 'http_method' => 'GET', 'path' => '/v1/groups', 'params' => [], 'args' => args }) end |
.name ⇒ Object
8 9 10 |
# File 'lib/models/group.rb', line 8 def self.name @@name end |
.path ⇒ Object
12 13 14 |
# File 'lib/models/group.rb', line 12 def self.path @@path end |
.pull_from_metafield(*args) ⇒ Object
81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/models/group.rb', line 81 def self.(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'pull_from_metafield', 'http_method' => 'POST', 'path' => '/v1/groups/{groupId}/meta/{field}/pull', 'params' => ['groupId', 'field', ], 'args' => args }) end |
.push_to_metafield(*args) ⇒ Object
94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/models/group.rb', line 94 def self.(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'push_to_metafield', 'http_method' => 'POST', 'path' => '/v1/groups/{groupId}/meta/{field}/push', 'params' => ['groupId', 'field', ], 'args' => args }) end |