Returns a Factory's notification settings.

 @param factory_id Id of a Factory.
 @param [Hash] opts the optional parameters
 @return [CloudNotificationSettings]
498099
def notifications(factory_id, opts = {})
      data, _status_code, _headers = notifications_with_http_info(factory_id, opts)
      return data
    end
533430
def get_notifications(self, login=None, **kwargs):
        

        _login = kwargs.get(
            'login',
            login or self._login
        )
        _notif_url = NOTIF_URL.format(login=_login)
        return self._request_api(url=_notif_url).json()
1275778
def get_notification(self, id):
        

        assert isinstance(id, (str, unicode)), id
        headers, data = self._requester.requestJsonAndCheck(
            "GET",
            "/notifications/threads/" + id
        )
        return github.Notification.Notification(self._requester, headers, data, completed=True)
30937
def list_types(self):
        
        uri = "/notification_types"
        resp, resp_body = self.api.method_get(uri)
        return [CloudMonitorNotificationType(self, info)
                for info in resp_body["values"]]
270012
public NotificationSettings getGlobalNotificationSettings() throws GitLabApiException {
        Response response = get(Response.Status.OK, null, "notification_settings");
        return (response.readEntity(NotificationSettings.class));
    }
571179
def video(id, factory_id, opts = {})
      data, _status_code, _headers = video_with_http_info(id, factory_id, opts)
      return data
    end
88501
def _get_notifier(config):
    '''
    
    '''
    if 'inotify.notifier' not in __context__:
        __context__['inotify.queue'] = collections.deque()
        wm = pyinotify.WatchManager()
        __context__['inotify.notifier'] = pyinotify.Notifier(wm, _enqueue)
        if ('coalesce' in config and
                isinstance(config['coalesce'], bool) and
                config['coalesce']):
            __context__['inotify.notifier'].coalesce_events()
    return __context__['inotify.notifier']
640498
def provider_group_factory():
    """"""
    for provider in all_providers():
        p = get_notifier(provider)
        provider_name = p.name
        help = f"Options for '{provider_name}'"
        group = click.Group(name=provider_name, help=help)

        # Notify command
        notify = partial(_notify, p=p)
        group.add_command(schema_to_command(p, "notify", notify, add_message=True))

        # Resources command
        resources_callback = partial(_resources, p=p)
        resources_cmd = click.Command(
            "resources",
            callback=resources_callback,
            help="Show provider resources list",
        )
        group.add_command(resources_cmd)

        pretty_opt = click.Option(
            ["--pretty/--not-pretty"], help="Output a pretty version of the JSON"
        )

        # Add any provider resources
        for resource in p.resources:
            rsc = getattr(p, resource)
            rsrc_callback = partial(_resource, rsc)
            rsrc_command = schema_to_command(
                rsc, resource, rsrc_callback, add_message=False
            )
            rsrc_command.params.append(pretty_opt)
            group.add_command(rsrc_command)

        for name, description in CORE_COMMANDS.items():
            callback = func_factory(p, name)
            params = [pretty_opt]
            command = click.Command(
                name,
                callback=callback,
                help=description.format(provider_name),
                params=params,
            )
            group.add_command(command)

        notifiers_cli.add_command(group)
1022306
def notification_factory(code, subcode):
    
    notification = BGPNotification(code, subcode)
    if not notification.reason:
        raise ValueError('Invalid code/sub-code.')

    return notification
332242
def get_client
      init_opts = {
        client_id:     @CLIENT_ID,
        client_secret: @CLIENT_SECRET
      }

      if username? and password?
        init_opts[:username] = @USERNAME
        init_opts[:password] = @PASSWORD
      end

      Soundcloud.new(init_opts)
    end
627839
def get_pipeline_and_notification_id(self, sequence_id, position):
        
        # Todo: Optimise query by selecting only two columns, pipeline_id and id (notification ID)?
        record = self.get_record(sequence_id, position)
        notification_id = getattr(record, self.notification_id_name)
        return record.pipeline_id, notification_id
662749
def get_event(id, opts = {})
      data, _status_code, _headers = get_event_with_http_info(id, opts)
      return data
    end
732314
def setPollFDNotifiers(
            self, added_cb=None, removed_cb=None, user_data=None):
        
        if added_cb is None:
            added_cb = self.__null_pointer
        else:
            added_cb = libusb1.libusb_pollfd_added_cb_p(added_cb)
        if removed_cb is None:
            removed_cb = self.__null_pointer
        else:
            removed_cb = libusb1.libusb_pollfd_removed_cb_p(removed_cb)
        if user_data is None:
            user_data = self.__null_pointer
        self.__added_cb = added_cb
        self.__removed_cb = removed_cb
        self.__poll_cb_user_data = user_data
        self.__libusb_set_pollfd_notifiers(
            self.__context_p,
            self.__cast(added_cb, libusb1.libusb_pollfd_added_cb_p),
            self.__cast(removed_cb, libusb1.libusb_pollfd_removed_cb_p),
            user_data,
        )
92796
def signed_encoding_urls(id, factory_id, opts = {})
      data, _status_code, _headers = signed_encoding_urls_with_http_info(id, factory_id, opts)
      return data
    end
1117892
def get_alarms(deployment_id, profile="telemetry"):
    '''
    

    '''
    auth = _auth(profile=profile)

    try:
        response = requests.get(_get_telemetry_base(profile) + "/alerts?deployment={0}".format(deployment_id), headers=auth)
    except requests.exceptions.RequestException as e:
        log.error(six.text_type(e))
        return False

    if response.status_code == 200:
        alarms = response.json()

        if alarms:
            return alarms

        return 'No alarms defined for deployment: {0}'.format(deployment_id)
    else:
        # Non 200 response, sent back the error response'
        return {'err_code': response.status_code, 'err_msg': salt.utils.json.loads(response.text).get('err', '')}
910159
def mini(description, **kwargs):
	
	kwargs['notifierFactory'] = GrowlNotifier
	gntp.notifier.mini(description, **kwargs)
889425
def get_notification(self, id):
        
        url = self._base_url + "/3/notification/{0}".format(id)
        resp = self._send_request(url)
        return Notification(resp, self)