title: How to iterate a parameter from tibble to a function
body: <p>I would like ideias to iterate rows from <code>tibble</code> parameter into a <code>user function</code>.</p>
  
  <p>I create a <code>loop for</code>, but I would like to use some functions of <code>Tidyverse</code>, like <code>purrr</code> or <code>dplyr</code>.</p>
  
  <p>The data set with Keys of API is like this:</p>
  
  <pre><code>keys.bots &lt;- tibble(bot = c('bot1', 'bot2', 'bot3', 'bot4', 'bot5'),
                      key = c('Key bot1','Key bot2','Key bot 3','Key bit 4','Key bot 5'))
  </code></pre>
  
  <p>Where each key should be iterated with some function with <code>purr</code> or <code>dplyr</code>, to iterate each key into the second parameter, <code>keys.bots[]</code>, in the function.</p>
  
  <p>The function is:</p>
  
  <pre><code>fun.get_data_blip &lt;- function(body, key, tzone){
  
    # Fetch Data from API
    request &lt;- POST( url  = url
                     ,body = body
                     ,add_headers(.headers = c( 'Authorization' = key
                                                ,'Content-Type'  = 'application/json')))
  
    # Extracting Request Content
    content &lt;- content(request, as = 'parsed')
  
    # Converting the List in Content to a Data Frame
    content$resource$items %&gt;%
      toJSON() %&gt;% 
      fromJSON() %&gt;% 
      mutate( lastMessage.date_alt = ymd_hms(lastMessage$date, tz = tzone.sao_paulo)
             ,lastMessage.direction_alt = if_else(lastMessage$direction == 'sent', 'Bot', 'Usuário')
             ,'#' = row_number()) %&gt;% 
      flatten(recursive = T) %&gt;% 
      as_tibble()
  </code></pre>
  
  <p>The function in action:</p>
  
  <pre><code>tbl.chatbots &lt;- fun.get_data_blip(body.threads, as.character(keys.bots[]), tzone.sao_paulo)
  </code></pre>
  
  <p>So during the iterate, the logic need to bind de result into <code>tbl.chatbots</code>, to increment the data of five bots one at time.</p>