<commit_before>import {createRequest} from './helpers'

const attachCardsToLists = (Trello) => (lists) => {
  var promises = lists.map(list => Trello.getListCards(list.id))

  return Promise.all([lists].concat(promises))
    .then(function(cards) {
      var lists = cards.shift()

      for (var i = 0, k = lists.length; i < k; i++) {
        if (!lists[i].cards)
          lists[i].cards = []

        lists[i].cards = cards[i]
      }

      return lists
    })
}

export default class Trello {
  static getAuthorizeUrl(token) {
    return `https://trello.com/1/connect?key=${token}&name=Edvisor&response_type=token&expiration=never&scope=read,write`
  }

  constructor(appKey, secret) {
    this.config = {appKey, secret}
  }

  getAuthorizeUrl() {
    return Trello.getAuthorizeUrl(this.config.appKey)
  }

  setToken(token) {
    this.config.secret = token
  }<commit_msg>fix get authorize url to not use Edvisor<commit_after>import {createRequest} from './helpers'

const attachCardsToLists = (Trello) => (lists) => {
  var promises = lists.map(list => Trello.getListCards(list.id))

  return Promise.all([lists].concat(promises))
    .then(function(cards) {
      var lists = cards.shift()

      for (var i = 0, k = lists.length; i < k; i++) {
        if (!lists[i].cards)
          lists[i].cards = []

        lists[i].cards = cards[i]
      }

      return lists
    })
}

export default class Trello {
  static getAuthorizeUrl(token, name) {
    return `https://trello.com/1/connect?key=${token}&name=${name}&response_type=token&expiration=never&scope=read,write`
  }

  constructor(appKey, secret) {
    this.config = {appKey, secret}
  }

  getAuthorizeUrl() {
    return Trello.getAuthorizeUrl(this.config.appKey)
  }

  setToken(token) {
    this.config.secret = token
  }
{'fraction_non_alphanumeric': 0.1509223029625489, 'fraction_numerical': 0.0022358859698155395, 'mean_word_length': 3.211764705882353, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2429735', 'n_tokens_mistral': 627, 'n_tokens_neox': 600, 'n_words': 114}