Skip to content
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

Use paraglidable forecast #3

Merged
merged 11 commits into from
Mar 24, 2019
Merged

Conversation

alexlapadu
Copy link
Collaborator

No description provided.

@alexlapadu alexlapadu changed the title Add get_paraglidable_json function WIP : Add get_paraglidable_json function Mar 9, 2019
@alexlapadu alexlapadu changed the title WIP : Add get_paraglidable_json function Use paraglidable forecast Mar 9, 2019
@alexlapadu alexlapadu force-pushed the Alapadu/request_paraglidable branch from afd3630 to 5eb8ef1 Compare March 12, 2019 00:38
@tilaktilak tilaktilak requested a review from maximepiton March 15, 2019 12:33
@tilaktilak tilaktilak added the enhancement New feature or request label Mar 15, 2019
Copy link
Collaborator

@tilaktilak tilaktilak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

coucou

paralert/paraglidable.py Outdated Show resolved Hide resolved
response = requests.get("https://api.paraglidable.com/?key=d60092fb1105a1f4&format=JSON&version=1")
forecast_pgble = json.loads(response.text)

utilities.write_to_JSON_file('./paraglidable_forecast/', 'forecast_pgble', forecast_pgble)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ce serait bien de pas avoir à enregistrer dans un fichier (Ca impose d'avoir des paths en dur dans le code + de créer un dossier + gérer les vieux fichiers) . On peut passer le json en sortie de la fonction non ? @maximepiton

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

paralert/paraglidable.py Outdated Show resolved Hide resolved
@@ -0,0 +1,16 @@
import json
from datetime import datetime, timedelta

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aaah mais je croyais que tu utilisais ça : https://docs.python.org/3.7/c-api/utilities.html
Peut être changer le nom du fichier pour pas que ça soit celui d'une lib par défaut.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done in paralert_tool


for x in range (0, len(pgble)):
print(
"Site : " + pgble[x][0] + '\n' +
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aha, nous fait pas une clément à aligner les symboles. @maximepiton va te faire passer son linter sur tout ça !

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vas'y max, je t'en pris :)

paralert/paraglidable_forecast/forecast_pgble.json Outdated Show resolved Hide resolved
paralert/paralert.py Outdated Show resolved Hide resolved
paralert/paraglidable.py Outdated Show resolved Hide resolved
paralert/utilities.py Outdated Show resolved Hide resolved
paralert/paraglidable.py Show resolved Hide resolved
@maximepiton maximepiton merged commit 883718d into master Mar 24, 2019
@alexlapadu
Copy link
Collaborator Author

alexlapadu commented Mar 24, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants