From 753d25b8b5ba2d5277d0726ba5f87980fca20cad Mon Sep 17 00:00:00 2001 From: Mickael Date: Sun, 18 Aug 2019 22:44:19 +0200 Subject: [PATCH] Use authkey --- scripts/generate_chat_info.py | 6 +++--- site/data/chat.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/generate_chat_info.py b/scripts/generate_chat_info.py index 2b5e8cc..d5652e4 100644 --- a/scripts/generate_chat_info.py +++ b/scripts/generate_chat_info.py @@ -1,5 +1,4 @@ from rocketchat_API.rocketchat import RocketChat -import dev_config as cfg import os import json from datetime import datetime @@ -18,10 +17,11 @@ def main(): recent_date = datetime.now() - monthdelta() - rocket = RocketChat(os.environ['ROCKETCHAT_USER'], os.environ['ROCKETCHAT_PWD'], server_url=cfg.rocket['server']) - + rocket = RocketChat(None, None, auth_token= os.environ['ROCKETCHAT_AUTH'], user_id= os.environ['ROCKETCHAT_USERID'], server_url=os.environ['ROCKETCHAT_SERVER']) + print("Check users") users = rocket.users_list().json() + crapauds_total = users["total"] print("Check channels") diff --git a/site/data/chat.json b/site/data/chat.json index 9aa5bbc..9f7a756 100644 --- a/site/data/chat.json +++ b/site/data/chat.json @@ -1 +1 @@ -{"crapauds": {"total": 2363, "recent": 84}, "canaux": {"total": 176, "recent": 102, "liste": ["accueil", "activite-et-travail", "agenda", "animation-crapauds", "aquaponie", "audio-visuel-libre", "bnb-bonheur-national-brut", "bresil", "burn-out", "cercle-autonomie-energetique", "cercle-blockchain-crypto", "cercle-collaboratif", "cercle-des-arts", "cercle-d\u00e9mocratie", "cercle-education", "cercle-game-changers", "cercle-generation-2050", "cercle-intergenerationnel", "cercle-neurodiversit\u00e9", "cercle-permaculture", "cercle-sante", "changer-de-paradigme", "cnv", "cohorte-2607", "cohorte-34", "cohorte-barcelone", "cohorte-belgique", "cohorte-bretagne", "cohorte-centre", "cohorte-geek", "cohorte-grece", "cohorte-grenoble", "cohorte-hdf", "cohorte-ile-de-france", "cohorte-loire", "cohorte-lyon-st-etienne", "cohorte-normandie", "cohorte-paca", "cohorte-scientifique", "cohorte-sud-ouest", "cohorte-suisse", "crapomobile", "desobeissance-civile", "dessins-citoyens-collectifs-booderies", "developpement-personnel", "doughnut-economics", "ecologie-biodiversite", "economie-connaissance", "ecovillages-ecoquartiers", "education-populaire", "emancipation-outre-mer", "emmaus-pau-lescar", "empowerment", "energie", "faire-avancer-le-schmilblick-ecologique", "foret_bleue", "fou-a-lier", "general", "geopolitique", "gestion-de-l-eau", "gilets-jaunes", "how-to-low-tech", "info-desintox", "intelligence-artificielle", "intelligence-collective", "jeux-inde-1", "journee-univ-j-verne-nantes-4-juil-2019", "la-bascule-lobby-citoyen", "langage-vrai-anti-glossaire", "le-led", "lhomme-et-la-terre", "libre", "lobbying", "logiciel-libre", "meditation", "mutuelle-sociale-solidaire", "nature-simplicite-bienveillance", "no-gafam", "open-hardware", "p-2-p-dat", "philosophie", "pratiques-artistiques", "projet-cand-alterincub-centre", "psychologie-neurologie", "radio-crapaud", "recherches-biologie", "recueil-temoignages", "reflexion-sur-l-argent", "rencontre-crapaud-kangourou", "right-to-repair", "semourais", "siteweb", "sociologie-de-l-effondrement", "solucracy", "survivalismes-et-resiliences", "terre-de-convergence", "tiers-lieux-apprenant", "transhumanisme-et-eugenisme", "tsunamis", "tvp-et-ebr", "wiki-crapaud-fou", "zero-dechet"]}, "messages": {"total": 185204, "recent": 12791}} \ No newline at end of file +{"crapauds": {"total": 2365, "recent": 0}, "canaux": {"total": 177, "recent": 99, "liste": ["accueil", "activite-et-travail", "agenda", "animation-crapauds", "audio-visuel-libre", "bnb-bonheur-national-brut", "bresil", "burn-out", "cercle-autonomie-energetique", "cercle-blockchain-crypto", "cercle-collaboratif", "cercle-des-arts", "cercle-d\u00e9mocratie", "cercle-education", "cercle-game-changers", "cercle-generation-2050", "cercle-intergenerationnel", "cercle-neurodiversit\u00e9", "cercle-permaculture", "cercle-sante", "changer-de-paradigme", "cohorte-2607", "cohorte-34", "cohorte-barcelone", "cohorte-belgique", "cohorte-bretagne", "cohorte-centre", "cohorte-geek", "cohorte-grece", "cohorte-grenoble", "cohorte-hdf", "cohorte-ile-de-france", "cohorte-loire", "cohorte-lyon-st-etienne", "cohorte-normandie", "cohorte-paca", "cohorte-scientifique", "cohorte-sud-ouest", "cohorte-suisse", "crapaud-fou-tv", "crapomobile", "desobeissance-civile", "dessins-citoyens-collectifs-booderies", "developpement-personnel", "doughnut-economics", "ecologie-biodiversite", "ecovillages-ecoquartiers", "education-populaire", "emancipation-outre-mer", "emmaus-pau-lescar", "empowerment", "energie", "faire-avancer-le-schmilblick-ecologique", "foret_bleue", "fou-a-lier", "general", "geopolitique", "gestion-de-l-eau", "gilets-jaunes", "how-to-low-tech", "info-desintox", "intelligence-artificielle", "intelligence-collective", "jeux-inde-1", "journee-univ-j-verne-nantes-4-juil-2019", "la-bascule-lobby-citoyen", "langage-vrai-anti-glossaire", "le-led", "lhomme-et-la-terre", "libre", "logiciel-libre", "meditation", "mutuelle-sociale-solidaire", "nature-simplicite-bienveillance", "no-gafam", "open-hardware", "p-2-p-dat", "philosophie", "pratiques-artistiques", "projet-cand-alterincub-centre", "psychologie-neurologie", "radio-crapaud", "recherches-biologie", "recueil-temoignages", "reflexion-sur-l-argent", "reflexion-sur-lamour", "rencontre-crapaud-kangourou", "right-to-repair", "semourais", "siteweb", "sociologie-de-l-effondrement", "solucracy", "survivalismes-et-resiliences", "terre-de-convergence", "tiers-lieux-apprenant", "tsunamis", "tvp-et-ebr", "wiki-crapaud-fou", "zero-dechet"]}, "messages": {"total": 186088, "recent": 13036}} \ No newline at end of file