Powered by AppSignal & Oban Pro
Would you like to see your link here? Contact us

Grain Father

notebook/grain_father.livemd

Grain Father

Setup / Login

alias BrewDash.Brews
alias BrewDash.Recipes
alias BrewDash.Repo
alias BrewDash.Schema.Brew
alias BrewDash.Schema.Recipe
alias BrewDash.Tasks.SyncGrainFather
# If you use the env var username, password GrainFather.login/0 will just work
# otherwise you will need to set them here. Take a look at the .envrc for how
# this all works.
# username = "xx"
# password = "xx"
# {:ok, token} = GrainFather.login(username, password)
{:ok, token} = GrainFather.login()
grain_father_sync_page_limit = 10

Import Recipes

# Fetch all the GrainFather's recipes
SyncGrainFather.sync_recipes!(token, grain_father_sync_page_limit)

Import Brews

# Fetch all the GrainFather's brew sessions
SyncGrainFather.sync_brew_sessions!(token, grain_father_sync_page_limit)