Generates Firebase id. article It caches with previous timestamp. If same timestamp is stored in the cache it will generate an incremental id in base 64 trying to increment the last possible character. ex:
- -Kyukibfm7T0jJT_Deyr
- -Kyukibfm7T0jJT_Deys
If last can not be incremented will update the next ex:
- -KyukibfiPUIPSaeXo9z
- -KyukibfiPUIPSaeXoA-
- -KyukibfiPUIPSaeXoA0 ... x) -KyukibfiPUIPSaeXoAz x) -KyukibfiPUIPSaeXoB- x) -KyukibfiPUIPSaeXoB0
If available in Hex, the package can be installed
by adding firebase_pushid to your list of dependencies in mix.exs:
def deps do
[{:firebase_pushid, "~> 0.1.0"}]
enddef application do
[applications: [:firebase_pushid]]
endAnd fetch your project's dependencies:
$ mix deps.get
iex> FirebasePushid.generate
"-KzO0n9zzKuWHH9i5t0l"Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/firebase_pushid.