Module: RegApi2::Folder

Extended by:
Folder
Includes:
Builder
Included in:
Folder
Defined in:
lib/reg_api2/folder.rb

Overview

REG.API folder category

Instance Method Summary (collapse)

Methods included from Builder

included

Instance Method Details

- (Object) add_services(opts = {})

Use this function to add services to folders.

Parameters:

  • opts (Hash) (defaults to: {})


68
# File 'lib/reg_api2/folder.rb', line 68

define :add_services

- (void) create(opts = {})

Note:

Support of service lists: no

This method returns an undefined value.

Creates a folder.

Examples:

Creation of folder

RegApi2.folder.create folder_name: 'test_folder_name'

Parameters:

  • opts (Hash) (defaults to: {})

Options Hash (opts):

  • :folder_name (String)

    The name of the new folder.



31
# File 'lib/reg_api2/folder.rb', line 31

define :create, required: %w[ folder_name ]

- (Object) get_services(opts = {})

Use this function to obtain the list of services available in the folder.

Parameters:

  • opts (Hash) (defaults to: {})


63
# File 'lib/reg_api2/folder.rb', line 63

define :get_services

- (Object) move_services(opts = {})

Use this function to move service between folders.

Parameters:

  • opts (Hash) (defaults to: {})


83
# File 'lib/reg_api2/folder.rb', line 83

define :move_services

- (Hash(id, name)) nop(opts = {})

Note:

Support of service lists: no

You can use this test function to check the availability of folders.

Examples:

Initialization with ID

RegApi2.folder.nop folder_id: 123456

Initialization with name

RegApi2.folder.nop folder_name: "test_folder_name"

Parameters:

  • opts (Hash) (defaults to: {})

Options Hash (opts):

  • :folder_name (String)

    Folder name to check.

  • :folder_id (String)

    Folder id to check.

Returns:

  • (Hash(id, name))

    Folder data.



21
# File 'lib/reg_api2/folder.rb', line 21

define :nop

- (void) remove(opts = {})

Note:

Support of service lists: no

This method returns an undefined value.

Removes a folder.

Examples:

Removing of folder by id

RegApi2.folder.remove folder_id: 123456

Removing of folder by name

RegApi2.folder.remove folder_name: 'test_folder_name'

Parameters:

  • opts (Hash) (defaults to: {})

Options Hash (opts):

  • :folder_id (Fixnum)

    Id of folder to remove.

  • :folder_name (String)

    The name of folder to remove.



44
# File 'lib/reg_api2/folder.rb', line 44

define :remove

- (Object) remove_services(opts = {})

Use this function to delete services from folders.

Parameters:

  • opts (Hash) (defaults to: {})


73
# File 'lib/reg_api2/folder.rb', line 73

define :remove_services

- (Hash(folder_content)) rename(opts = {})

Note:

Support of service lists: no

Renames a folder.

Examples:

Renaming of folder by id

RegApi2.folder.rename folder_id: 123456, new_folder_name: 'new_test_folder_name'

Renaming of folder by name

RegApi2.folder.rename folder_name: 'test_folder_name', new_folder_name: 'new_test_folder_name'

Parameters:

  • opts (Hash) (defaults to: {})

Options Hash (opts):

  • :folder_id (Fixnum)

    Id of folder to rename.

  • :folder_name (String)

    The name of folder to rename.

  • :new_folder_name (String)

    Defines the new name of folder.

Returns:

  • (Hash(folder_content))

    Folder content.



58
# File 'lib/reg_api2/folder.rb', line 58

define :rename, required: %w[ new_folder_name ]

- (Object) replace_services(opts = {})

This function allows replacement of services already available in a folder with other services (deletes the service available in the folder and adds the services defined by the domain_name or service_id parameter).

Parameters:

  • opts (Hash) (defaults to: {})


78
# File 'lib/reg_api2/folder.rb', line 78

define :replace_services