# Copyright 2019-     DNB
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import warnings

from robot.api import logger
from robot.libraries.BuiltIn import BuiltIn

from .Notify import Notify
from .version import __version__



class rbfSlack(Notify):
    """rbfSlack is a slack module for Robot Framework.

    This library provides functionality within Robot Framework to push automated test status to SLack Channel.

To utilize this, pass rbfSlack as robot listener argument during execution. 
For example: robot --listener rbfSlack.Notify:${slackChannelID}:${slackToken}:${testSuite}:${builtBy}:${builtWhy}

Values of Parameters ${slackChannelID}, ${slackToken}, ${testSuite} are configured and picked up at run-time from global.resource file.
Values of Parameters ${builtBy} and ${builtWhy} are collected from the Build tool (Bamboo/Jenkins)
    
    """
    ROBOT_LIBRARY_SCOPE = 'TEST SUITE'
    ROBOT_LIBRARY_VERSION = __version__
