Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
W
Webservice Marcimex
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Luis Acosta
Webservice Marcimex
Commits
61dd0635
Commit
61dd0635
authored
Dec 24, 2024
by
Luis Acosta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Version 1.0.3
parent
52cfc855
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
31 deletions
+27
-31
app.py
app.py
+27
-31
No files found.
app.py
View file @
61dd0635
...
...
@@ -36,7 +36,7 @@ fecha_hora = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
@
app
.
route
(
'/'
)
def
home
():
return
jsonify
({
"
Mensaje"
:
"Hola"
}),
200
return
jsonify
({
"
error"
:
"Error Access"
}),
401
#return jsonify(resultado)
@
app
.
route
(
'/login'
,
methods
=
[
'POST'
])
...
...
@@ -162,7 +162,7 @@ def Generate_Campaign():
response
=
callcenter
.
search_campaing
(
camp_id_search
)
data
=
response
.
json
()[
'id'
]
insert
=
callcenter
.
insert_number_campaing
(
data
,
campaign_fields
,
campaign_data
)
print
(
insert
)
#
print(insert)
data_response
=
json
.
loads
(
insert
)[
"status"
]
...
...
@@ -173,7 +173,7 @@ def Generate_Campaign():
else
:
callcenter
=
Callcenter
(
api_key
,
cc_url
)
cread_camp
=
callcenter
.
created_campaing
(
camp_name
,
date_ini_camp
,
time_ini_camp
,
date_fin_camp
,
time_fin_camp
,
campaign_queue
,
camp_obsv
)
print
(
cread_camp
)
#
print(cread_camp)
return
jsonify
({
"mensaje"
:
f
"No Encontrado Campaing , {camp_name}! Se debe crear una campaña"
}),
401
...
...
@@ -193,7 +193,7 @@ def Consult_Campaign():
callcenter
=
Callcenter
(
api_key
,
cc_url
)
consult_calls
=
callcenter
.
consult_campaing
(
campaign_id
,
campaign_date_ini
,
campaign_date_fin
)
data_response
=
json
.
loads
(
consult_calls
)[
"hydra:member"
]
print
(
data_response
)
#
print(data_response)
raw_json
=
data_response
[
0
]
#return jsonify({"mensaje": f"Datos Ingresados , {dataCollection} ;{campaign_id};{campaign_date_ini};{campaign_date_fin}"}), 401
...
...
@@ -262,7 +262,3 @@ def acceso():
if
__name__
==
'__main__'
:
app
.
run
(
debug
=
True
,
host
=
'0.0.0.0'
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment