Created
November 20, 2017 23:57
-
-
Save ijiraq/1ad22eda4517ac6644dd13846de71408 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def smoka_datarequest(frame_ids): | |
""" | |
Make a datarequest given a SMOKA frame id. | |
This is method is in here as an exmple for datalink service to follow. | |
:param frame_ids: list of frames to retrieve | |
:type frame_ids: list | |
:return: The content of the resulting POST to the smoka datarequest service. | |
""" | |
endpoint = """http://smoka.nao.ac.jp/datarequest""" | |
data = [('action', 'Datarequest'), ('search_type', '')] | |
for frame_id in frame_ids: | |
data.append(('frameinfo', frame_id)) | |
return requests.post(endpoint, data=data).content |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment