.. index:: 
  !StringDict.get Method
  
.. _id3_document_string_dict_get_class_method:

===============================================================================
StringDict.get Method
===============================================================================

Module: :ref:`StringDict<id3_document_string_dict_class>`

Definition
----------

Gets an item of the StringDict object.


.. tab-set::

    .. tab-item:: Python
      :sync: Python

      .. code:: Python

        get(self, key: str) -> str

      **Parameters**

        .. line-block::

          ``key`` str
          :guilabel:`in` Unique key of the  item to get.


      **Returns**

        .. line-block::

          ``str``
           item to get.

      **Exceptions**

        .. line-block::

          :ref:`DocumentException<id3_document_document_exception>`
          An error has occurred during Document Library execution.


    .. tab-item:: Dart
      :sync: Dart

      .. code:: Dart

        String get(String? key)

      **Parameters**

        .. line-block::

          ``key`` String
          :guilabel:`in` Unique key of the  item to get.


      **Returns**

        .. line-block::

          ``String``
           item to get.

      **Exceptions**

        .. line-block::

          :ref:`DocumentException<id3_document_document_exception>`
          An error has occurred during Document Library execution.


    .. tab-item:: C#
      :sync: C#

      .. code:: C#

        public string Get(string key)

      **Parameters**

        .. line-block::

          ``key`` string
          :guilabel:`in` Unique key of the  item to get.


      **Returns**

        .. line-block::

          ``string``
           item to get.

      **Exceptions**

        .. line-block::

          :ref:`DocumentException<id3_document_document_exception>`
          An error has occurred during Document Library execution.


    .. tab-item:: Java
      :sync: Java

      .. code:: Java

        public String get(String key) throws DocumentException

      **Parameters**

        .. line-block::

          ``key`` String
          :guilabel:`in` Unique key of the  item to get.


      **Returns**

        .. line-block::

          ``String``
           item to get.

      **Exceptions**

        .. line-block::

          :ref:`DocumentException<id3_document_document_exception>`
          An error has occurred during Document Library execution.


    .. tab-item:: Swift
      :sync: Swift

      .. code:: Swift

        public func get(key: String) throws -> String

      **Parameters**

        .. line-block::

          ``key`` String
          :guilabel:`in` Unique key of the  item to get.


      **Returns**

        .. line-block::

          ``String``
           item to get.

      **Exceptions**

        .. line-block::

          :ref:`DocumentException<id3_document_document_exception>`
          An error has occurred during Document Library execution.


    .. tab-item:: C
      :sync: C

      .. code:: C

        int id3DocumentStringDict_Get (
            ID3_DOCUMENT_STRING_DICT hStringDict, 
            const char * key, 
            char * item, 
            int * itemSize)

      **Parameters**

        .. line-block::

          ``hStringDict`` :ref:`ID3_DOCUMENT_STRING_DICT<id3_document_string_dict_class>`
          :guilabel:`in` Handle to the StringDict object.

          ``key`` const char *
          :guilabel:`in` Unique key of the  item to get.

          ``item`` char *
          :guilabel:`out`  item to get.

          ``itemSize`` int *
          :guilabel:`in` Size of the 'item' buffer. Receives the minimum required buffer size to hold the 'item' string if the given one is too small (including the terminating NULL character), otherwise receives the number of characters in 'item' (excluding terminating NULL character).


      **Returns**

        .. line-block::

          ``int``
          An error code.
          See :ref:`id3DocumentError<id3_document_document_error_enum>` file for the list of possible error codes.


