Skip to content

Commit

Permalink
an example of a more complex zone name search
Browse files Browse the repository at this point in the history
  • Loading branch information
mahtin committed Apr 9, 2020
1 parent 102286e commit 5b28101
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions examples/example_zone_search.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
:

ZONE=${1-example.com}
EXTRA=${2}

SEARCH_TYPES="
equal
not_equal
greater_than
less_than
starts_with
ends_with
contains
starts_with_case_sensitive
ends_with_case_sensitive
contains_case_sensitive
list_contains
"

for search_type in ${SEARCH_TYPES}
do
echo TRY: "name=${search_type}:${ZONE}"
cli4 per_page=50 name="${search_type}:${ZONE}" ${EXTRA} /zones/ | jq -r '.[]|.id,.name' | paste - -
done

exit 0

0 comments on commit 5b28101

Please sign in to comment.