.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Gedcom::WebServices 3pm" .TH Gedcom::WebServices 3pm "2022-10-16" "perl v5.34.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Gedcom::WebServices \- Basic web service routines for Gedcom.pm .PP Version 1.22 \- 15th November 2019 .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& wget \-qO \- http://www.example.com/ws/plain/my_family/i9/name .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module provides web service access to a \s-1GEDCOM\s0 file in conjunction with mod_perl. Using it, A request for information can be made in the form of a \s-1URL\s0 specifying the \s-1GEDCOM\s0 file to be used, which information is required and the format in which the information is to be delivered. This information is then returned in the specified format. .PP There are currently three supported formats: .IP "\(bu" 4 plain \- no markup .IP "\(bu" 4 \&\s-1XML\s0 .IP "\(bu" 4 \&\s-1JSON\s0 .SS "URLs" .IX Subsection "URLs" The format of the URLs used to access the web services are: .PP .Vb 2 \& $BASEURL/$FORMAT/$GEDCOM/$XREF/requested/information \& $BASEURL/$FORMAT/$GEDCOM?search=search_criteria .Ve .IP "\s-1BASEURL\s0" 4 .IX Item "BASEURL" The base \s-1URL\s0 to access the web services. .IP "\s-1FORMAT\s0" 4 .IX Item "FORMAT" The format in which to return the results. .IP "\s-1GEDCOM\s0" 4 .IX Item "GEDCOM" The name of the \s-1GEDCOM\s0 file to use (the extension .ged is assumed). .IP "\s-1XREF\s0" 4 .IX Item "XREF" The xref of the record about which information is required. XREFs can be obtained initially from a search, and subsequently from certain queries. .IP "requested/information" 4 .IX Item "requested/information" The information requested. This is in the same format as that taken by the get_value method. .IP "search_criteria" 4 .IX Item "search_criteria" An individual to search for. This is in the same format as that taken by the get_individual method. .SH "EXAMPLES" .IX Header "EXAMPLES" .Vb 2 \& $ wget \-qO \- \*(Aqhttp://pjcj.sytes.net:8585/ws/plain/royal92?search=elizabeth_ii\*(Aq \& /ws/plain/royal92/I52 \& \& $ wget \-qO \- http://pjcj.sytes.net:8585/ws/plain/royal92/I52 \& 0 @I52@ INDI \& 1 NAME Elizabeth_II Alexandra Mary/Windsor/ \& 1 TITL Queen of England \& 1 SEX F \& 1 BIRT \& 2 DATE 21 APR 1926 \& 2 PLAC 17 Bruton St.,London,W1,England \& 1 FAMS @F14@ \& 1 FAMC @F12@ \& \& $ wget \-qO \- http://pjcj.sytes.net:8585/ws/plain/royal92/I52/name \& Elizabeth_II Alexandra Mary /Windsor/ \& \& $ wget \-qO \- http://pjcj.sytes.net:8585/ws/plain/royal92/I52/birth/date \& 21 APR 1926 \& \& $ wget \-qO \- http://pjcj.sytes.net:8585/ws/plain/royal92/I52/children \& /ws/plain/royal92/I58 \& /ws/plain/royal92/I59 \& /ws/plain/royal92/I60 \& /ws/plain/royal92/I61 \& \& $ wget \-qO \- http://pjcj.sytes.net:8585/ws/json/royal92/I52/name \& {"name":"Elizabeth_II Alexandra Mary /Windsor/"} \& \& $ wget \-qO \- http://pjcj.sytes.net:8585/ws/xml/royal92/I52/name \& Elizabeth_II Alexandra Mary /Windsor/ \& \& $ wget \-qO \- http://pjcj.sytes.net:8585/ws/xml/royal92/I52 \& \& Elizabeth_II Alexandra Mary/Windsor/ \& Queen of England \& F \& \& 21 APR 1926 \& 17 Bruton St.,London,W1,England \& \& \& \& .Ve .SH "CONFIGURATION" .IX Header "CONFIGURATION" Add a section similar to the following to your mod_perl config: .PP .Vb 2 \& PerlWarn On \& PerlTaintCheck On \& \& PerlPassEnv GEDCOM_TEST \& \& \& \& $Gedcom::TEST = 1; \& \& \& \& \& use Apache::Status; \& \& $ENV{PATH} = "/bin:/usr/bin"; \& delete @ENV{"IFS", "CDPATH", "ENV", "BASH_ENV"}; \& \& $Gedcom::DATA = $Gedcom::ROOT; # location of data stored on server \& \& use lib "$Gedcom::ROOT/blib/lib"; \& use Gedcom::WebServices; \& \& my $handlers = \& [ qw \& ( \& plain \& xml \& json \& ) \& ]; \& \& eval Gedcom::WebServices::_set_handlers($handlers); \& # use Apache::PerlSections; print STDERR Apache::PerlSections\->dump; \& \& \& PerlTransHandler Gedcom::WebServices::_parse_uri .Ve .SH "BUGS" .IX Header "BUGS" Very probably. .PP See the \s-1BUGS\s0 file. And the \s-1TODO\s0 file. .SH "VERSION" .IX Header "VERSION" Version 1.22 \- 15th November 2019 .SH "LICENCE" .IX Header "LICENCE" Copyright 2005\-2019, Paul Johnson (paul@pjcj.net) .PP This software is free. It is licensed under the same terms as Perl itself. .PP The latest version of this software should be available from my homepage: http://www.pjcj.net