I have a website in wordpress, made by myself, if it is called School Circuit, in it I need to consume the data of a webservice to manage championships, teams, games, students, etc ... The company responsible for the Web Service passed me pdf's with an example of how to pull this data, but as I never did this, unfortunately I can not get the information, please, if you can just give me an example of how to do this, it would be very thankful! Att
Here's one of my attempts, it's all wrong
$api_request = 'https://www.sportsmanager.com.br/api/[email protected]&token=SDE78623GVS7234GNMSKLano=&status=';
$response = wp_remote_get( $api_request ).html();
$(function() {
$("texte").html();
});
edit: one more attempt fails, I just need to understand how the structure works ...
$url = 'https://www.sportsmanager.com.br/api/[email protected]&token=SLSO8342HSDE7GVS7234GNL&ano2018&status=A';
$response = wp_remote_get( $url );
$api_response = json_decode( wp_remote_retrieve_body( $response ), true );
print_r ($api_response);
echo $api_response;