-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[EdfColorDay Bridge] add new bridge #4370
base: master
Are you sure you want to change the base?
[EdfColorDay Bridge] add new bridge #4370
Conversation
Pull request artifacts
last change: Monday 2024-12-16 17:52:39 |
{ | ||
// Set the locale to French | ||
setlocale(LC_TIME, 'fr_FR.UTF-8'); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do not change locale. Can you find another way?
$contract = $this->getKey('contract'); | ||
|
||
$header = [ | ||
'Content-type: application/json', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is wrong. This is the content type of the data in the http request. There is none body in request.
You probably meant to use Accept
?
See https://stackoverflow.com/questions/35722586/http-headers-accept-and-content-type-in-a-rest-context
*/ | ||
private function tempo(string $json): void | ||
{ | ||
$jsonDecoded = json_decode($json, true, 512, JSON_THROW_ON_ERROR); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check out Json::decode
Hi,
I'm adding a new bridge to be able to get the color of the current day and the next day.
Info are based on RTE data: https://www.services-rte.com/fr/visualisez-les-donnees-publiees-par-rte/calendrier-des-offres-de-fourniture-de-type-tempo.html
Screenshot: