-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from metacall import metacall_load_from_file, metacall_await | ||
import json | ||
|
||
# TODO: This test won't work because python port has no metacall_await | ||
# implemented yet, this is a task to be done in metacall/core | ||
|
||
metacall_load_from_file('node', ['./spacex.js']) | ||
response = metacall_await('getSpaceXData') | ||
print(json.dumps(response, indent=4)) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
metacall==0.5.0 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module.exports = { | ||
getSpaceXData: async () => { | ||
try { | ||
const response = await axios.get('https://api.spacexdata.com/v3/launchpads') | ||
return response.data | ||
} catch (error) { | ||
return error | ||
} | ||
} | ||
}; |