|
|
@ -44,31 +44,31 @@ def silence(): |
|
|
|
#************************************************* |
|
|
|
#DANGER si on touche à l'indentation pour swagger, c'est cuit! |
|
|
|
|
|
|
|
# class Username(Resource): |
|
|
|
# def get(self, username): |
|
|
|
# """ |
|
|
|
# This examples uses FlaskRESTful Resource |
|
|
|
# It works also with swag_from, schemas and spec_dict |
|
|
|
# --- |
|
|
|
# parameters: |
|
|
|
# - in: path |
|
|
|
# name: username |
|
|
|
# type: string |
|
|
|
# required: true |
|
|
|
# responses: |
|
|
|
# 200: |
|
|
|
# description: A single user item |
|
|
|
# schema: |
|
|
|
# id: User |
|
|
|
# properties: |
|
|
|
# username: |
|
|
|
# type: string |
|
|
|
# description: The name of the user |
|
|
|
# default: Steven Wilson |
|
|
|
# """ |
|
|
|
# return {'username': username}, 200 |
|
|
|
# |
|
|
|
# api.add_resource(Username, '/username/<username>') |
|
|
|
class Username(Resource): |
|
|
|
def get(self, username): |
|
|
|
""" |
|
|
|
This examples uses FlaskRESTful Resource |
|
|
|
It works also with swag_from, schemas and spec_dict |
|
|
|
--- |
|
|
|
parameters: |
|
|
|
- in: path |
|
|
|
name: username |
|
|
|
type: string |
|
|
|
required: true |
|
|
|
responses: |
|
|
|
200: |
|
|
|
description: A single user item |
|
|
|
schema: |
|
|
|
id: User |
|
|
|
properties: |
|
|
|
username: |
|
|
|
type: string |
|
|
|
description: The name of the user |
|
|
|
default: Steven Wilson |
|
|
|
""" |
|
|
|
return {'username': username}, 200 |
|
|
|
|
|
|
|
api.add_resource(Username, '/username/<username>') |
|
|
|
|
|
|
|
#************************************************* |
|
|
|
|
|
|
@ -193,8 +193,9 @@ api.add_resource(Paheko_user, '/paheko/user/<numero>') |
|
|
|
|
|
|
|
# #************************************************* |
|
|
|
#variables globales |
|
|
|
ident_paheko='hfdd76cxza_ro' |
|
|
|
pass_paheko='LQBOyfuYaYnhhYTwVPpGNg' |
|
|
|
# TODO: accéder aux mdp pour éviter de les stocker |
|
|
|
ident_paheko='5zgz7x5gje_ro' |
|
|
|
pass_paheko='K4Mk19irsOZ03YuRKXIg' |
|
|
|
url_paheko='https://kaz-paheko.kazkouil.fr' |
|
|
|
|
|
|
|
#************************************************* |
|
|
|