Module: PublicFolders
- Included in:
- Config
- Defined in:
- lib/user/config/public_folders.rb
Instance Method Summary collapse
-
#create_public_folder(data) ⇒ Object
Create public folder.
-
#get_public_folder(id) ⇒ Object
Get public folder.
-
#get_public_folder_support_data(id) ⇒ Object
Get public folder support data.
-
#get_public_folders ⇒ Object
Get public folders.
-
#get_public_folders_for_object(options) ⇒ Object
Get public folders for object.
-
#sync_public_folders_for_object(data) ⇒ Object
Sync public folders for object.
-
#update_public_folder(id, data) ⇒ Object
Update public folder.
Instance Method Details
#create_public_folder(data) ⇒ Object
Create public folder.
Create a public folder with data.
Parameters
- data
-
(Hash) – Data to be submited.
Example
data = {
"title": "New Public Folder",
"slug": "new-public-folder",
"object_type": "contacts",
"visible": true
}
@data = @mints_user.create_public_folder(data.to_json)
61 62 63 |
# File 'lib/user/config/public_folders.rb', line 61 def create_public_folder(data) return @client.raw("post", "/config/public-folders", nil, data) end |
#get_public_folder(id) ⇒ Object
Get public folder.
Get a public folder info.
Parameters
- id
-
(Integer) – Public folder id.
- options
-
(Hash) – List of Resource Collection Options shown above can be used as parameter.
Example
@data = @mints_user.get_public_folder(3)
105 106 107 |
# File 'lib/user/config/public_folders.rb', line 105 def get_public_folder(id) return @client.raw("get", "/config/public-folders/#{id}") end |
#get_public_folder_support_data(id) ⇒ Object
Get public folder support data.
Get support data used in a public folder.
Parameters
- id
-
(Integer) – Public folder id.
Example
@data = @mints_user.get_public_folder_support_data(1)
92 93 94 |
# File 'lib/user/config/public_folders.rb', line 92 def get_public_folder_support_data(id) return @client.raw("get", "/config/public-folders/support-data/#{id}") end |
#get_public_folders ⇒ Object
Get public folders.
Get a collection of public folders.
Example
@data = @mints_user.get_public_folders
43 44 45 |
# File 'lib/user/config/public_folders.rb', line 43 def get_public_folders return @client.raw("get", "/config/public-folders") end |
#get_public_folders_for_object(options) ⇒ Object
Get public folders for object.
Get public folders for object.
Parameters
- options
-
(Hash) – List of Resource Collection Options shown above can be used as parameter.
Example
= {
"object_type": "contacts",
"object_id": 1
}
@data = @mints_user.get_public_folders_for_object()
34 35 36 |
# File 'lib/user/config/public_folders.rb', line 34 def get_public_folders_for_object() return @client.raw("get", "/config/public-folders/get_public-folders_for_object", ) end |
#sync_public_folders_for_object(data) ⇒ Object
Sync public folders for object.
Sync public folders for object.
Parameters
- data
-
(Hash) – Data to be submited.
Example
data = {
"object_type": "contacts",
"object_id": 1
}
@data = @mints_user.sync_public_folders_for_object(data.to_json)
18 19 20 |
# File 'lib/user/config/public_folders.rb', line 18 def sync_public_folders_for_object(data) return @client.raw("put", "/config/public-folders/sync_public-folders_for_object", nil, data) end |
#update_public_folder(id, data) ⇒ Object
Update public folder.
Update a public folder info.
Parameters
- id
-
(Integer) – Public folder id.
- data
-
(Hash) – Data to be submited.
Example
data = {
"title": "New Public Folder Modified",
"slug": "new-public-folder",
"object_type": "contacts",
"visible": true
}
@data = @mints_user.update_public_folder(20, data.to_json)
80 81 82 |
# File 'lib/user/config/public_folders.rb', line 80 def update_public_folder(id, data) return @client.raw("put", "/config/public-folders/#{id}", nil, data) end |