Skip to content

Instantly share code, notes, and snippets.

@rlcarrca

rlcarrca/get_metadata.sh

Last active Oct 16, 2020
Embed
What would you like to do?
RETS server connectivity via curl
curl \
--digest \
--user-agent "MyCurlClient/1.0" \
-o data/metadata.xml \
--show-error \
--dump-header data/headers.txt \
-u "username:password" \
--header "RETS-Version: RETS/1.5" \
--cookie-jar data/cookies.txt \
--cookie data/cookies.txt \
--data Type=METADATA-SYSTEM \
--data ID=* \
--data Format=COMPACT \
"https://rets.crmls.org/contact/rets/getMetadata"
curl --digest \
--user-agent "MyCurlClient/1.0" \
-o data/login.xml \
--show-error \
--dump-header data/headers.txt \
-u "username:password" \
--header "RETS-Version: RETS/1.5" \
--cookie-jar data/cookies.txt \
"url"
curl \
--digest \
--user-agent "MyCurlClient/1.0" \
-o "data/search.xml" \
--show-error \
--dump-header data/headers.txt \
-u "username:password" \
--header "RETS-Version: RETS/1.5" \
--cookie-jar data/cookies.txt \
--cookie data/cookies.txt \
--data Format=COMPACT \
--data SearchType=Property \
--data Class=Residential \
--data StandardNames=0 \
--data QueryType=DMQL2 \
--data Query="(Status=A+)" \
"https://rets.crmls.org/contact/rets/search"
curl \
--digest \
--user-agent "MyCurlClient/1.0" \
-o "data/search2.xml" \
--show-error \
--dump-header data/headers.txt \
-u "username:password" \
--header "RETS-Version: RETS/1.5" \
--cookie-jar data/cookies.txt \
--cookie data/cookies.txt \
--data Format=COMPACT \
--data SearchType=Media \
--data Class=Media \
--data StandardNames=0 \
--data QueryType=DMQL2 \
--data Query="(MediaKey=),(MediaType=IMAGE)" \
"https://rets.crmls.org/contact/rets/search"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment