Skip to content

Commit

Permalink
example API
Browse files Browse the repository at this point in the history
  • Loading branch information
teuben committed Jul 9, 2020
1 parent 57b8ac4 commit c357948
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions API/ascl
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#! /usr/bin/env python
#
#

import os
import sys

if len(sys.argv) == 1:
print("simple search for a name in ASCL")
sys.exit(0)

name = sys.argv[1]


url = 'https://dev.ascl.net/api/search/?q=title:"%s"&fl=ascl_id,title,abstract' % name
cmd = "curl '%s'" % url
print(cmd)
os.system(cmd)

0 comments on commit c357948

Please sign in to comment.