• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hivesolutions / colony-plugins / 1474

pending completion
1474

push

travis-ci-com

joamag
feat: new binaries

41245 of 79069 relevant lines covered (52.16%)

2.41 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

82.61
/api_yadis/src/api_yadis_plugin.py
1
#!/usr/bin/python
2
# -*- coding: utf-8 -*-
3

4
# Hive Colony Framework
5
# Copyright (c) 2008-2020 Hive Solutions Lda.
6
#
7
# This file is part of Hive Colony Framework.
8
#
9
# Hive Colony Framework is free software: you can redistribute it and/or modify
10
# it under the terms of the Apache License as published by the Apache
11
# Foundation, either version 2.0 of the License, or (at your option) any
12
# later version.
13
#
14
# Hive Colony Framework is distributed in the hope that it will be useful,
15
# but WITHOUT ANY WARRANTY; without even the implied warranty of
16
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
# Apache License for more details.
18
#
19
# You should have received a copy of the Apache License along with
20
# Hive Colony Framework. If not, see <http://www.apache.org/licenses/>.
21

22
__author__ = "João Magalhães <joamag@hive.pt>"
11✔
23
""" The author(s) of the module """
24

25
__version__ = "1.0.0"
11✔
26
""" The version of the module """
27

28
__revision__ = "$LastChangedRevision$"
11✔
29
""" The revision number of the module """
30

31
__date__ = "$LastChangedDate$"
11✔
32
""" The last change date of the module """
33

34
__copyright__ = "Copyright (c) 2008-2020 Hive Solutions Lda."
11✔
35
""" The copyright for the module """
36

37
__license__ = "Apache License, Version 2.0"
11✔
38
""" The license for the module """
39

40
import colony
11✔
41

42
class APIYadisPlugin(colony.Plugin):
11✔
43
    """
44
    The main class for the Yadis API plugin.
45
    """
46

47
    id = "pt.hive.colony.plugins.api.yadis"
11✔
48
    name = "Yadis API"
11✔
49
    description = "The plugin that offers the Yadis API"
11✔
50
    version = "1.0.0"
11✔
51
    author = "Hive Solutions Lda. <development@hive.pt>"
11✔
52
    platforms = [
11✔
53
        colony.CPYTHON_ENVIRONMENT
54
    ]
55
    capabilities = [
11✔
56
        "api.yadis"
57
    ]
58
    dependencies = [
11✔
59
        colony.PluginDependency("pt.hive.colony.plugins.client.http")
60
    ]
61
    main_modules = [
11✔
62
        "api_yadis"
63
    ]
64

65
    def load_plugin(self):
11✔
66
        colony.Plugin.load_plugin(self)
×
67
        import api_yadis
×
68
        self.system = api_yadis.APIYadis(self)
×
69

70
    def create_client(self, api_attributes):
11✔
71
        """
72
        Creates a client, with the given API attributes.
73

74
        :type api_attributes: Dictionary
75
        :param api_attributes: The API attributes to be used.
76
        :rtype: YadisClient
77
        :return: The created client.
78
        """
79

80
        return self.system.create_client(api_attributes)
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc