Skip to content

Commit

Permalink
properly passing data post requests (#273)
Browse files Browse the repository at this point in the history
* properly passing data post requests

* fixing name args get_list_products_with_conditions call
  • Loading branch information
burnout87 authored Aug 16, 2024
1 parent 18ba2f2 commit 26987dd
Showing 1 changed file with 11 additions and 11 deletions.
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

0 comments on commit 26987dd

Please sign in to comment.