-
-
Save lsommerer/1b658266243b9fff69667fd0f680ae21 to your computer and use it in GitHub Desktop.
Family Echo Test
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
# | |
# 1) first install requests from the command line: python -m pip install requests | |
# | |
import requests | |
def main(): | |
format = 'json' | |
operation = 'temp_view' | |
family = sample_GEDCOM_file() | |
url = 'https://www.familyecho.com/api/' | |
payload = {'format': format, 'operation': operation, 'family': family} | |
response = requests.post(url, data=payload) | |
print(response.text) | |
def sample_GEDCOM_file(): | |
return """ | |
0 HEAD | |
1 SOUR Family Echo | |
2 WWW http://www.familyecho.com/ | |
1 FILE Family 28 | |
1 DATE 1 OCT 2022 | |
1 DEST ANSTFILE | |
1 GEDC | |
2 VERS 5.5.1 | |
2 FORM LINEAGE-LINKED | |
1 SUBM @I1@ | |
2 NAME Lloyd Sommerer | |
1 SUBN | |
1 CHAR UTF-8 | |
0 @I1@ INDI | |
1 NAME Lloyd /Sommerer/ | |
2 GIVN Lloyd | |
2 NSFX Jr. | |
2 SURN Sommerer | |
2 _MARNM Sommerer | |
1 FAMC @F1@ | |
0 @I2@ INDI | |
1 NAME Lloyd /Sommerer/ | |
2 GIVN Lloyd | |
2 NSFX Sr. | |
2 SURN Sommerer | |
2 _MARNM Sommerer | |
1 SEX M | |
1 FAMS @F1@ | |
0 @I3@ INDI | |
1 NAME Jane /Sommerer/ | |
2 GIVN Jane | |
2 SURN Sommerer | |
2 _MARNM Sommerer | |
1 SEX F | |
1 FAMS @F1@ | |
0 @F1@ FAM | |
1 HUSB @I2@ | |
1 WIFE @I3@ | |
1 CHIL @I1@ | |
1 _CURRENT Y | |
1 _PRIMARY Y | |
0 TRLR | |
""" | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment