Gets channel information by channel id

        Args:
            channel_id(int): the id of channel

        Returns:
            Channel

        Throws:
            RTMServiceError when request failed
181462
def info(self, channel_id):
        
        resource = 'v1/channel.info?channel_id={}'.format(channel_id)
        resp = self._rtm_client.get(resource)
        if resp.is_fail():
            raise RTMServiceError("Failed to get channel information", resp)

        return resp.data['result']
351106
def __getChannelId(self):

        

        if not self.search_params.get("channelId"):
            return

        api_fixed_url = "https://www.googleapis.com/youtube/v3/channels?part=id&maxResults=1&fields=items%2Fid&"
        url = api_fixed_url + urlencode({"key": self.api_key, "forUsername": self.search_params["channelId"]})
        get = requests.get(url).json()

        try:
            self.search_params["channelId"] = get['items'][0]['id']
            return # got it

        except IndexError:
            pass # try searching now...

        api_fixed_url = "https://www.googleapis.com/youtube/v3/search?part=snippet&type=channel&fields=items%2Fid&"
        url = api_fixed_url + urlencode({"key": self.api_key, "q": self.search_params['channelId']})
        get = requests.get(url).json()

        try:
            self.search_params["channelId"] = get['items'][0]['id']['channelId']

        except IndexError:
            del self.search_params["channelId"]
1043761
def get_subscriptions_by_channel_id_and_subscriber_id(
            self, channel_id, subscriber_id):
        
        return self.search_subscriptions(
            channel_id=channel_id, subscriber_id=subscriber_id)
384013
def _get_next_available_channel_id(self):
        
        for index in compatibility.RANGE(self._last_channel_id or 1,
                                         self.max_allowed_channels + 1):
            if index in self._channels:
                continue
            self._last_channel_id = index
            return index

        if self._last_channel_id:
            self._last_channel_id = None
            return self._get_next_available_channel_id()

        raise AMQPConnectionError(
            'reached the maximum number of channels %d' %
            self.max_allowed_channels)
101751
def get_episode(self, episode_id):
        

        raw_response = requests_util.run_request('get', self.API_BASE_URL + '/episodes/%d' % episode_id,
                                                 headers=self.__get_header_with_auth())

        return self.parse_raw_response(raw_response)
222455
def get_channel_listing(self):
        
        teams = self.get('/teams')
        for team in teams:
            if team['name'].lower() == self.team:
                channel_listing = self.get('/teams/' + team['id'] + '/channels')
                return channel_listing
1191348
def channels(self):
        
        if self._channels is None:
            self._channels = ChannelList(self._version, service_sid=self._solution['sid'], )
        return self._channels
159591
def push_msg(self, channel_id, msg):
        

        if type(msg) is not str:
            msg = urlencode(msg)

        return self.push(channel_id, msg)
268152
def _get_all_initialized_channels(self):
        
        channels_dict = defaultdict(list)
        for service_base_dir in self._get_persistent_mpe_dir().glob("*/*"):
            org_id     = service_base_dir.parent.name
            service_id = service_base_dir.name
            channels   = self._get_initialized_channels_for_service(org_id, service_id)
            if (channels):
                channels_dict[(org_id, service_id)] = channels
        return channels_dict
532471
def create_channel(self, channel):
        

        data = {'channels': channel}
        return super(ApiInterfaceRequest, self).post('api/v3/channel/', data)
948178
def get(self, media_id):
        
        response = self._get('item', format_dict=dict(media_id=media_id))
        return VoicebaseMedia(response, api=self.api)
585854
protected boolean checkChannelId(final int id, final String svcType)
	{
		if (id == channelId)
			return true;
		logger.warn("received service " + svcType + " with wrong channel ID " + id + ", expected " + channelId
				+ " - ignored");
		return false;
	}
1282790
private ChannelInfo getChannelInfo(int channelId) {
        ChannelInfo info = channels.putIfAbsent(channelId, new ChannelInfo());
        if (info == null) {
            info = channels.get(channelId);
        }
        return info;
    }
1050769
def request(self, id, **kwargs):
        
        data = self.get('requests', id, **kwargs)
        return data
166071
def get(self, agent_id, media_id):
        
        return requests.get(self.get_url(agent_id, media_id))
835772
def _next_channel_id(self):
        ''''''
        self._channel_counter += 1
        if self._channel_counter >= self._channel_max:
            self._channel_counter = 1
        return self._channel_counter
1195108
public IClientStream getStreamByChannelId(int channelId) {
        // channels 2 and 3 are "special" and don't have an IClientStream associated
        if (channelId < 4) {
            return null;
        }
        Number streamId = getStreamIdForChannelId(channelId);
        if (log.isTraceEnabled()) {
            log.trace("Stream requested for channel id: {} stream id: {} streams: {}", channelId, streamId, streams);
        }
        return getStreamById(streamId);
    }