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

properly passing data post requests #273

Merged
merged 5 commits into from
Aug 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions oda_api/gallery_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,12 @@ def get_list_images_with_conditions(self,
rev2_value = self.get_revnum(t2, token)

return self.get_list_products_with_conditions(token=token,
instrument_name=instrument,
product_type='image',
e1_kev=e1_kev,
e2_kev=e2_kev,
rev1_value=rev1_value,
rev2_value=rev2_value)
instrument_name=instrument,
product_type='image',
e1_kev_value=e1_kev,
e2_kev_value=e2_kev,
rev1_value=rev1_value,
rev2_value=rev2_value)


def get_list_lightcurve_with_conditions(self,
Expand Down Expand Up @@ -347,7 +347,7 @@ def update_source_with_name(self,
logger.info(posting_msg)

res = requests.post(os.path.join(self.url, "post_astro_entity_to_gallery"),
params={**params},
data=params,
)
response_json = self._decode_res_json(res)

Expand Down Expand Up @@ -416,7 +416,7 @@ def update_observation_with_title(self,
logger.info(posting_msg)

res = requests.post(os.path.join(self.url, "post_observation_to_gallery"),
params={**params},
data=params,
files=files_obj
)
response_json = self._decode_res_json(res)
Expand Down Expand Up @@ -483,7 +483,7 @@ def post_observation_to_gallery(self,
logger.info(posting_msg)

res = requests.post(os.path.join(self.url, "post_observation_to_gallery"),
params={**params},
data=params,
files=files_obj
)

Expand Down Expand Up @@ -535,7 +535,7 @@ def delete_data_product_from_gallery_via_product_id(self,
logger.info(posting_msg)

res = requests.post("%s/delete_product_to_gallery" % self.url,
params={**params}
data=params
)

if res.status_code != 200:
Expand Down Expand Up @@ -787,7 +787,7 @@ def post_data_product_to_gallery(self,
logger.info(posting_msg)

res = requests.post("%s/post_product_to_gallery" % self.url,
params={**params},
data=params,
files=files_obj
)

Expand Down
Loading