Sha256: d352ac493e9b5f203cdaa6cd04c85914753f28b3fe611e3791ff84fdfcf82bfe

Contents?: true

Size: 1.01 KB

Versions: 2

Compression:

Stored size: 1.01 KB

Contents

module Lumberg
  module Cpanel
    # Public: Allows users to create and manage GnuPG keys
    class Gpg < Base
      # Public: List public GPG keys installed for the user
      #
      # Returns Hash API response
      def list
        perform_request({ :api_function => 'listgpgkeys' })
      end

      # Public: Count the number of public GPG keys installed for a user. You
      # must have access to the 'gpg' feature to use this function.
      #
      # Returns Hash API response
      def count
        perform_request({ :api_function => 'number_of_public_keys' })
      end

      # Public: List GPG private (secret) keys associated with a user
      #
      # Returns Hash API response
      def list_private
        perform_request({ :api_function => 'listsecretgpgkeys' })
      end

      # Public: Count the number of private GPG keys installed for a user
      #
      # Returns Hash API response
      def count_private
        perform_request({ :api_function => 'number_of_private_keys' })
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
lumberg-2.0.0.pre4 lib/lumberg/cpanel/gpg.rb
lumberg-2.0.0.pre3 lib/lumberg/cpanel/gpg.rb