jonocarroll / ntfy

Lightweight Wrapper to the ntfy.sh Service
Other
68 stars 3 forks source link

Include list of tags to help autocomplete #8

Closed coolbutuseless closed 1 year ago

coolbutuseless commented 1 year ago

Idea - include a named list of all tags so that user can harness autocomplete for all the tag names.

e.g.

tags <- c(
  "-1", "1", "100", "1234", "1st_place_medal", "2nd_place_medal", 
  "3rd_place_medal", "8ball", "a", "ab", "abacus", "abc", "abcd", 
  "accept", "accordion", "adhesive_bandage", "adult", "aerial_tramway", 
  ...
  "zero", "zimbabwe", "zipper_mouth_face", "zombie", "zombie_man", 
  "zombie_woman", "zzz")

.tag <- as.list(stats::setNames(as.list(tags), tags))

Now in the console .tag$c<TAB> will show all tags starting with c

And then you can do the following

ntfy::ntfy_send(server = "ntfy.sh", topic = "RStats", message = "Hello", tags = list(.tag$cat, .tag$dog))
jonocarroll commented 1 year ago
show_emoji("8ball")

 🎱 8ball 

:smile: