FirebasePushid
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: 1) -Kyukibfm7T0jJT_Deyr 2) -Kyukibfm7T0jJT_Deys
If last can not be incremented will update the next ex: 1) -KyukibfiPUIPSaeXo9z 2) -KyukibfiPUIPSaeXoA- 3) -KyukibfiPUIPSaeXoA0 … x) -KyukibfiPUIPSaeXoAz x) -KyukibfiPUIPSaeXoB- x) -KyukibfiPUIPSaeXoB0
Installation
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"}]
end
def application do
[applications: [:firebase_pushid]]
end
And fetch your project’s dependencies:
$ mix deps.get
Usage
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.