Module: PublicFolders
- Included in:
- PublicConfig
- Defined in:
- lib/pub/config/public_folders.rb
Instance Method Summary collapse
-
#get_public_folder(slug, options) ⇒ Object
Get Public Folder.
-
#get_public_folders(options = nil) ⇒ Object
Get Public Folders.
Instance Method Details
#get_public_folder(slug, options) ⇒ Object
Get Public Folder.
Get a public folder info.
Parameters
- slug
-
(String) – It’s the string identifier generated by Mints.
- options
-
(Hash) – List of Single Resource Options shown above can be used as parameter.
First Example
= {
object_type: "products"
}
@data = @mints_pub.get_public_folder('yellow', )
Second Example
= {
object_type: "products",
fields: 'id, title'
}
@data = @mints_pub.get_public_folder('yellow', )
48 49 50 |
# File 'lib/pub/config/public_folders.rb', line 48 def get_public_folder(slug, ) @client.raw('get', "/config/public-folders/#{slug}", ) end |
#get_public_folders(options = nil) ⇒ Object
Get Public Folders.
Get a collection of public folders.
Parameters
- options
-
(Hash) – List of Single Resource Options shown above can be used as parameter.
First Example
= {
object_type: "products"
}
@data = @mints_pub.get_public_folders()
Second Example
= {
object_type: "products",
fields: "id",
sort: "-id"
}
@data = @mints_pub.get_public_folders()
24 25 26 |
# File 'lib/pub/config/public_folders.rb', line 24 def get_public_folders( = nil) @client.raw('get', '/config/public-folders', ) end |