Parameters
        ----------
        val_id : str

        Returns
        -------
        requests.Response
977076
def on_command_control(self, val_id):
        
        data = "control,controlId=1|" + val_id
        return self._basic_post(url='commandControlPublic', data=data)
253746
def get_meta_data(self, request_adu):
        "
        try:
            transaction_id, protocol_id, length, unit_id = \
                unpack_mbap(request_adu[:7])
        except struct.error:
            raise ServerDeviceFailureError()

        return {
            'transaction_id': transaction_id,
            'protocol_id': protocol_id,
            'length': length,
            'unit_id': unit_id,
        }
763548
def into(self, val: str) -> Union['ApiNode', 'ApiEndpoint']:
        """"""
        if val in self.paths:
            return self.paths[val]
        if self.param:
            return self.param
        raise IndexError(_("Value {} is missing from api").format(val))
1142135
def status_pin(self, id):
        
        id = self.__unpack_id(id)
        url = '/api/v1/statuses/{0}/pin'.format(str(id))
        return self.__api_request('POST', url)
426189
def get(self, request, id, format=None):
        
        bot = self.get_bot(id, request.user)
        serializer = BotSerializer(bot)
        return Response(serializer.data)
892211
def get_requests_request_id(self, request_id):
        
        route_values = {}
        if request_id is not None:
            route_values['requestId'] = self._serialize.url('request_id', request_id, 'str')
        response = self._send(http_method='GET',
                              location_id='ebc09fe3-1b20-4667-abc5-f2b60fe8de52',
                              version='5.0-preview.1',
                              route_values=route_values)
        return self._deserialize('Request', response)
1097304
def push(self, channel_id, data):
        

        channel_path = self.channel_path(channel_id)
        response = requests.post(channel_path, data)

        return response.json()
26069
async def coro_request(self, method, params):
        
        response = await self._coro_make_request(method, params)

        if "error" in response:
            raise ValueError(response["error"])

        if response['result'] is None:
            raise ValueError(f"The call to {method} did not return a value.")

        return response['result']
262182
def get(self, account_id):
        
        response = self.client._make_request('/accounts/{0}'.format(account_id))
        return response.json()
242062
def request_id(self, request_id):
        
        if request_id is not None and not re.search('^[A-Za-z0-9]{32}', request_id):
            raise ValueError("Invalid value for `request_id`, must be a follow pattern or equal to `/^[A-Za-z0-9]{32}/`")

        self._request_id = request_id
954135
def get(cls, id, api=None):
        
        id = Transform.to_resource(id)
        api = api if api else cls._API
        if 'get' in cls._URL:
            extra = {'resource': cls.__name__, 'query': {'id': id}}
            logger.info('Fetching {} resource'.format(cls), extra=extra)
            resource = api.get(url=cls._URL['get'].format(id=id)).json()
            return cls(api=api, **resource)
        else:
            raise SbgError('Unable to fetch resource!')
1146194
def get_result(api, trans_id, id_get):
    '''
    
    '''
    check_values = {'api': api, 'id_get': id_get, 'trans_id': trans_id}

    check_transaction = requests.post(CHECK_URL_FINAL, data=check_values)
    result = check_transaction.text
    if result == "1":
        print(".‫تراکنش موفقیت آمیز بوده است‬")
        return True
    elif result == "-1":
        print(
            "‫‪ api‬ارسالی با نوع ‪ api‬تعریف شده در ‪ payline‬سازگار نیست.‬")
    elif result == "-2":
        print(".ارسال شده معتبر نمی باشد‬ trans_id")
    elif result == "-3":
        print(".‫id_get ارسال شده معتبر نمی باشد‬")
    elif result == "-4":
        print(".‫چنین تراکنشی در سیستم وجود ندارد و یا موفقیت آمیز نبوده است‬")
    else:
        print("some error(s) occurred, please try again.")
634537
def recv(self, request_id):
        
        log.debug("Reading response %d from Kafka" % request_id)

        # Make sure we have a connection
        if not self._sock:
            self.reinit()

        # Read the size off of the header
        resp = self._read_bytes(4)
        (size,) = struct.unpack('>i', resp)

        # Read the remainder of the response
        resp = self._read_bytes(size)
        return resp
1228149
def filter(self, id):
        
        id = self.__unpack_id(id)
        url = '/api/v1/filters/{0}'.format(str(id))
        return self.__api_request('GET', url)
571257
def request_info(self, request_id):
        
        request_url = "{}pull-request/{}".format(self.create_basic_url(),
                                                 request_id)

        return_value = self._call_api(request_url)
        return return_value
1203544
def unwrap(self, val):
        
        if val.getID()!=self.id:
            self._update(val)
        return self._unwrap(val)
1006964
def slice_query(self, slice_id):
        
        viz_obj = get_viz(slice_id)
        security_manager.assert_datasource_permission(viz_obj.datasource)
        return self.get_query_string_response(viz_obj)