Skip to content

Documentation ARexxAPI ADDRINFO

Jens Maus edited this page Feb 13, 2017 · 1 revision

ADDRINFO

NAME:: AddrInfo -- Return information about an address book entry. (V2.0)

TEMPLATE:: VAR/K,STEM/K,ALIAS/A

FUNCTION:: Returns information about an address book entry.

INPUTS:: VAR/K - variable to store the results of the query\ STEM/K - base name used for the stems where the returned data will be stored\ ALIAS/A - alias of the entry to return info about\

RETURNS:: <STEM>TYPE - type of entry, may be one of P (person), L (distribution list) or G (group)\ <STEM>NAME - real name of this entry\ <STEM>EMAIL - email address of this entry\ <STEM>PGP - PGP key ID of this entry\ <STEM>HOMEPAGE - homepage of this entry\ <STEM>STREET - street address of this entry\ <STEM>CITY - city for this entry\ <STEM>COUNTRY - country for this entry\ <STEM>PHONE - phone # of this entry\ <STEM>COMMENT - comment stored with this entry\ <STEM>BIRTHDATE - date of birth of this entry, in (D)DMMYYYY format\ <STEM>IMAGE - filename with the portrait picture of this entry\ <STEM>MEMBERS.COUNT - number of members, if the entry is actually a distribution list\ <STEM>MEMBERS.NR - the nth member if the entry is actually a distribution list, NR being a number between 0 and n-1\

 `RC` is set to 10 if the supplied alias does not exist or none was provided.

NOTES:: Fields where information is not available are returned as an empty string, except for the birth date which is returned as a literal zero (0).

EXAMPLE:: {{{#!arexx

 /* Enable result codes */
 OPTIONS RESULTS

 /* Ignore possible error from ADDRINFO */
 OPTIONS FAILAT 11

 /* Find a given entry */
 ADDRINFO 'mars' STEM st.

 /* Only continue if RC == 0 */
 IF RC ~= 0 THEN EXIT

 /* List results */
 SAY 'Type of entry: 'st.type
 SAY 'Real name:     'st.name
 SAY 'Email address: 'st.email
 SAY 'PGP key ID:    'st.pgp
 SAY 'Homepage:      'st.homepage
 SAY 'Street:        'st.street
 SAY 'City:          'st.city
 SAY 'Country:       'st.country
 SAY 'Phone #:       'st.phone
 SAY 'Description:   'st.comment
 SAY 'Date of birth: 'st.birthdate
 SAY 'Portrait:      'st.image
 }}}

BUGS::

SEE ALSO::

Home

Getting Started

Troubleshooting

Advanced use of YAM

Cookbooks

Development

Clone this wiki locally