#1182 hub: document get_channel arguments
Merged 2 years ago by mikem. Opened 2 years ago by ktdreyer.
ktdreyer/koji doc-get-channel  into  master

file modified
+12 -1

@@ -4713,7 +4713,18 @@ 

      return True

  

  def get_channel(channelInfo, strict=False):

-     """Return information about a channel."""

+     """

+     Look up the ID number and name for a channel.

+ 

+     :param channelInfo: channel ID or name

+     :type channelInfo: int or str

+     :param bool strict: If True, raise an error if we found no matching

+                         channel. If False, simply return None if we found no

+                         matching channel. If unspecified, the default value is

+                         False.

+     :returns: dict of the channel ID and name, or None.

+               For example, {'id': 20, 'name': 'container'}

+     """

      fields = ('id', 'name')

      query = """SELECT %s FROM channels

      WHERE """ % ', '.join(fields)

Describe each of the arguments to the get_channel() method.

rebased onto 9242e9e

2 years ago

Commit ce1644b fixes this pull-request

Pull-Request has been merged by mikem

2 years ago