-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deixar as fichas em modo Dinâmico de modo que ao incluir novas fichas já aparecem nas suas respectivas sessões #4
Comments
Para implementar o dinamismo das fichas, foi necessário criar uma função em PHP. Veja como a função foi estruturada: php Nessa função, o parâmetro $code é utilizado para construir a variável $indicator, que é concatenada com o prefixo 'RIPSA'. O $indicator é então utilizado para formar a URL da API. A função wp_remote_get realiza a requisição para essa URL, e a resposta é retornada. Desta forma, $indicator serve como referência para carregar a ficha correta com base na entrada dos endpoints na base de dados. |
[like] Sousa, Juliana (BIR) reacted to your message:
…________________________________
From: ramosluc ***@***.***>
Sent: Monday, September 2, 2024 6:31:26 PM
To: bireme/fichas-idb-wp-plugin ***@***.***>
Cc: Sousa, Juliana (BIR) ***@***.***>; Author ***@***.***>
Subject: [Caution EXT] Re: [bireme/fichas-idb-wp-plugin] Deixar as fichas em modo Dinâmico de modo que ao incluir novas fichas já aparecem nas suas respectivas sessões (Issue #4)
[Caution: External Email]
Para implementar o dinamismo das fichas, foi necessário criar uma função em PHP. Veja como a função foi estruturada:
php
Copiar código
function fetch_api_data($code) {
$indicator = 'RIPSA' . $code;
$api_url = 'https://mgdi-api.teste.bireme.org/api/indicador/' . $indicator;
$response = wp_remote_get($api_url);
return $response;
}
Nessa função, o parâmetro $code é utilizado para construir a variável $indicator, que é concatenada com o prefixo 'RIPSA'. O $indicator é então utilizado para formar a URL da API. A função wp_remote_get realiza a requisição para essa URL, e a resposta é retornada. Desta forma, $indicator serve como referência para carregar a ficha correta com base na entrada dos endpoints na base de dados.
—
Reply to this email directly, view it on GitHub<#4 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADGRHTPAS5BB53MN46YKKWTZUSVH5AVCNFSM6AAAAABNQXXVX2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRVGE4DMNBVGQ>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
IMPORTANT: This transmission is for use by the intended recipient and it may contain privileged, proprietary or confidential information. If you are not the intended recipient or a person responsible for delivering this transmission to the intended recipient, you may not disclose, copy or distribute this transmission or take any action in reliance on it. If you received this transmission in error, please dispose of and delete this transmission. Thank you.
|
No description provided.
The text was updated successfully, but these errors were encountered: