Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
esap-userprofile-python-client
Manage
Activity
Members
Labels
Plan
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ASTRON SDC
ESCAPE WP5
esap-userprofile-python-client
Commits
3c55cd66
Commit
3c55cd66
authored
Jun 23, 2021
by
Hugh Dickinson
Browse files
Options
Downloads
Patches
Plain Diff
Fixed package layout.
parent
258ff669
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
setup.py
+1
-1
1 addition, 1 deletion
setup.py
shopping_client/__init__.py
+1
-0
1 addition, 0 deletions
shopping_client/__init__.py
shopping_client/shopping_client.py
+2
-2
2 additions, 2 deletions
shopping_client/shopping_client.py
with
4 additions
and
3 deletions
setup.py
+
1
−
1
View file @
3c55cd66
...
@@ -8,7 +8,7 @@ setuptools.setup(
...
@@ -8,7 +8,7 @@ setuptools.setup(
version
=
"
0.0.1
"
,
version
=
"
0.0.1
"
,
author
=
"
Hugh Dickinson
"
,
author
=
"
Hugh Dickinson
"
,
author_email
=
"
hugh.dickinson@open.ac.uk
"
,
author_email
=
"
hugh.dickinson@open.ac.uk
"
,
description
=
"
A small example package
"
,
description
=
"
Python client for ESAP Data Discovery Shoipping Basket
"
,
long_description
=
long_description
,
long_description
=
long_description
,
long_description_content_type
=
"
text/markdown
"
,
long_description_content_type
=
"
text/markdown
"
,
url
=
"
https://git.astron.nl/astron-sdc/esap-userprofile-python-client
"
,
url
=
"
https://git.astron.nl/astron-sdc/esap-userprofile-python-client
"
,
...
...
This diff is collapsed.
Click to expand it.
shopping_client/__init__.py
0 → 100644
+
1
−
0
View file @
3c55cd66
from
.shopping_client
import
shopping_client
This diff is collapsed.
Click to expand it.
shopping_client.py
→
shopping_client/
shopping_client.py
+
2
−
2
View file @
3c55cd66
...
@@ -17,9 +17,9 @@ class shopping_client:
...
@@ -17,9 +17,9 @@ class shopping_client:
def
get_basket
(
self
,
reload
=
False
):
def
get_basket
(
self
,
reload
=
False
):
if
self
.
basket
is
None
or
reload
:
if
self
.
basket
is
None
or
reload
:
url
=
urllib
.
parse
.
urljoin
(
self
.
host
,
shopping_client
.
endpoint
)
url
=
urllib
.
parse
.
urljoin
(
self
.
host
,
shopping_client
.
endpoint
)
print
(
url
)
#
print(url)
response
=
requests
.
get
(
url
,
dict
(
user_name
=
self
.
username
))
response
=
requests
.
get
(
url
,
dict
(
user_name
=
self
.
username
))
print
(
response
.
content
)
#
print(response.content)
if
response
.
ok
:
if
response
.
ok
:
self
.
basket
=
json
.
loads
(
response
.
content
)[
"
results
"
][
0
][
"
shopping_cart
"
]
self
.
basket
=
json
.
loads
(
response
.
content
)[
"
results
"
][
0
][
"
shopping_cart
"
]
return
self
.
basket
return
self
.
basket
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment