GetPublisher.
        [Preview API]
        :param str publisher_name:
        :param int flags:
        :rtype: :class:`<Publisher> <azure.devops.v5_0.gallery.models.Publisher>`
480404
def get_publisher(self, publisher_name, flags=None):
        
        route_values = {}
        if publisher_name is not None:
            route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str')
        query_parameters = {}
        if flags is not None:
            query_parameters['flags'] = self._serialize.query('flags', flags, 'int')
        response = self._send(http_method='GET',
                              location_id='4ddec66a-e4f6-4f5d-999e-9e77710d7ff4',
                              version='5.0-preview.1',
                              route_values=route_values,
                              query_parameters=query_parameters)
        return self._deserialize('Publisher', response)
1333910
def get_published_or_draft(self):
        
        if self.is_published:
            return self
        elif self.publishing_linked_id:
            return self.publishing_linked
        if is_draft_request_context():
            return self.get_draft()
        # There is no public version, and there is no privilege to view the
        # draft version
        return None
1063267
def rpc(message_name, data=nil, opts={})
      message_name = validated_message_name(message_name)
      publisher.rpc(message_name, data, opts)
    end
1126136
def get_preview_name(self):
        
        if self.safe_type == EsaSafeType.OLD_TYPE:
            name = _edit_name(self.tile_id, AwsConstants.PVI, delete_end=True)
        else:
            name = '_'.join([self.tile_id.split('_')[1], self.get_datatake_time(), AwsConstants.PVI])
        return '{}.jp2'.format(name)
1008185
def get_api_publisher(self, social_user):
        

        def _post(**kwargs):
            api = self.get_api(social_user)
            author = {
                'group_id': kwargs.get('group_id'),
                'user_id': kwargs.get('user_id'),
            }
            server_data = api.photos.getWallUploadServer(**author)
            attachments = []

            for _file in kwargs['files']:
                upload_data = requests.post(
                    server_data['upload_url'], files={"photo": _file}).json()
                upload_data.update(author)
                photos_data = api.photos.saveWallPhoto(**upload_data)
                attachments.append('photo{owner_id}_{id}'.format(**photos_data[0]))

            del kwargs['files']
            kwargs['attachments'] = ','.join(attachments)
            response = api.wall.post(**kwargs)

            server_data.update(response)
            return server_data

        return _post
984860
def preview_text
      res = result
      [label, res.strip] unless res.nil? || res.empty?
    end
239133
def get_publisher(self, publisher_id):
        
        route_values = {}
        if publisher_id is not None:
            route_values['publisherId'] = self._serialize.url('publisher_id', publisher_id, 'str')
        response = self._send(http_method='GET',
                              location_id='1e83a210-5b53-43bc-90f0-d476a4e5d731',
                              version='5.0',
                              route_values=route_values)
        return self._deserialize('Publisher', response)
584888
def get(self):
        
        if len(self.publishers) == 0:
            return Publisher(name=self.name, parent_pool=self)
        else:
            return self.publishers.pop()
1151839
def getPrinted(self):
        
        workflow = getToolByName(self, 'portal_workflow')
        review_state = workflow.getInfoFor(self, 'review_state', '')
        if review_state not in ['published']:
            return "0"
        report_list = sorted(self.objectValues('ARReport'),
                             key=lambda report: report.getDatePublished())
        if not report_list:
            return "0"
        last_report = report_list[-1]
        if last_report.getDatePrinted():
            return "1"
        else:
            for report in report_list:
                if report.getDatePrinted():
                    return "2"
        return "0"
703877
def is_published_version(self):
        
        pub_ver = getattr(self, 'published_version', None)
        this_ver = getattr(self, 'this_version', None)
        return this_ver and pub_ver and (this_ver == pub_ver)
997150
public <T> void publisher(Class<T> api,
                          Result<T> result)
  {
    String path = api.getName();
      
    String address = address(path);
      
    ServicesAmp manager = ServicesAmp.current();
    ServiceRefAmp pubRef = manager.service(address);
      
    result.ok(pubRef.as(api));
  }
121996
public static String getMessageSelector(String eventName, IPublisherInfo publisherInfo) {
        StringBuilder sb = new StringBuilder(
                "(JMSType='" + eventName + "' OR JMSType LIKE '" + eventName + ".%') AND (Recipients IS NULL");
        
        if (publisherInfo != null) {
            for (String selector : publisherInfo.getAttributes().values()) {
                addRecipientSelector(selector, sb);
            }
        }
        
        sb.append(')');
        return sb.toString();
    }
798260
def get_publisher_name(self, **kwargs):
        """"""
        children = kwargs.get('children', [])
        # Find the creator type in children.
        for child in children:
            if child.tag == 'name':
                return child.content
        return None
204185
def author_view(self, context):
        
        root_xblock = context.get('root_xblock')

        if root_xblock and root_xblock.location == self.location:
            # User has clicked the "View" link. Show an editable preview of this block's children
            return self.author_edit_view(context)
        return self.author_preview_view(context)
561996
def publish_pdb_state(self):
        
        if self._pdb_obj and self._do_publish_pdb_state:
            state = dict(namespace_view = self.get_namespace_view(),
                         var_properties = self.get_var_properties(),
                         step = self._pdb_step)
            self.send_spyder_msg('pdb_state', content={'pdb_state': state})
        self._do_publish_pdb_state = True
126968
def get_asset_from_edit_extension_draft(self, publisher_name, draft_id, asset_type, extension_name, **kwargs):
        
        route_values = {}
        if publisher_name is not None:
            route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str')
        if draft_id is not None:
            route_values['draftId'] = self._serialize.url('draft_id', draft_id, 'str')
        if asset_type is not None:
            route_values['assetType'] = self._serialize.url('asset_type', asset_type, 'str')
        query_parameters = {}
        if extension_name is not None:
            query_parameters['extensionName'] = self._serialize.query('extension_name', extension_name, 'str')
        response = self._send(http_method='GET',
                              location_id='88c0b1c8-b4f1-498a-9b2a-8446ef9f32e7',
                              version='5.0-preview.1',
                              route_values=route_values,
                              query_parameters=query_parameters,
                              accept_media_type='application/octet-stream')
        if "callback" in kwargs:
            callback = kwargs["callback"]
        else:
            callback = None
        return self._client.stream_download(response, callback=callback)
578915
def ensure_iam(self, publisher=None):
        
        topic = self.get_topic_param()
        client = self.session.client('pubsub', 'v1', 'projects.topics')
        policy = client.execute_command('getIamPolicy', {'resource': topic})
        policy.pop('etag')
        found = False
        for binding in policy.get('bindings', {}):
            if binding['role'] != 'roles/pubsub.publisher':
                continue
            if publisher in binding['members']:
                return
            found = binding

        if not found:
            policy.setdefault(
                'bindings', {'members': [publisher], 'role': 'roles/pubsub.publisher'})
        else:
            found['members'].append(publisher)

        client.execute_command('setIamPolicy', {'resource': topic, 'body': {'policy': policy}})