<commit_before>import base64

from binder import bind_api
from parsers import *
from models import User, Status

"""Twitter API"""
class API(object):

  def __init__(self, username=None, password=<PASSWORD>, host='twitter.com', secure=False,
                classes={'user': User, 'status': Status}):
    if username and password:
      self._b64up = base64.b64encode('%s:%s' % (username, password))
    else:
      self._b64up = None
    self.host = host
    self.secure = secure
    self.classes = classes

  """Get public timeline"""
  public_timeline = bind_api(
      path = '/statuses/public_timeline.json',
      parser = parse_statuses,
      allowed_param = []
  )

  """Get friends timeline"""
  friends_timeline = bind_api(
      path = '/statuses/friends_timeline.json',
      parser = parse_statuses,
      allowed_param = ['since_id', 'max_id', 'count', 'page'],
      require_auth = True
  )

  """Get user timeline"""
  user_timeline = bind_api(
      path = '/statuses/user_timeline.json',
      parser = parse_statuses,
      allowed_param = ['id', 'user_id', 'screen_name', 'since_id',
                        'max_id', 'count', 'page']
  )

api = API('jitterapp', 'josh1987')<commit_msg>Added mensions endpoint.<commit_after>import base64

from binder import bind_api
from parsers import *
from models import User, Status

"""Twitter API"""
class API(object):

  def __init__(self, username=None, password=<PASSWORD>, host='twitter.com', secure=False,
                classes={'user': User, 'status': Status}):
    if username and password:
      self._b64up = base64.b64encode('%s:%s' % (username, password))
    else:
      self._b64up = None
    self.host = host
    self.secure = secure
    self.classes = classes

  """Get public timeline"""
  public_timeline = bind_api(
      path = '/statuses/public_timeline.json',
      parser = parse_statuses,
      allowed_param = []
  )

  """Get friends timeline"""
  friends_timeline = bind_api(
      path = '/statuses/friends_timeline.json',
      parser = parse_statuses,
      allowed_param = ['since_id', 'max_id', 'count', 'page'],
      require_auth = True
  )

  """Get user timeline"""
  user_timeline = bind_api(
      path = '/statuses/user_timeline.json',
      parser = parse_statuses,
      allowed_param = ['id', 'user_id', 'screen_name', 'since_id',
                        'max_id', 'count', 'page']
  )

  """Get mentions"""
  mentions = bind_api(
      path = '/statuses/mentions.json',
      parser = parse_statuses,
      allowed_param = ['since_id', 'max_id', 'count', 'page'],
      require_auth = True
  )

api = API('jitterapp', 'josh1987')
{'fraction_non_alphanumeric': 0.1416097190584662, 'fraction_numerical': 0.010630220197418374, 'mean_word_length': 3.1236306729264474, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, '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': '5050172', 'n_tokens_mistral': 869, 'n_tokens_neox': 826, 'n_words': 198}