nodes: 0, module; 1, function_definition; 2, function_name:get_activities; 3, parameters; 4, block; 5, identifier:self; 6, default_parameter; 7, default_parameter; 8, default_parameter; 9, expression_statement; 10, if_statement; 11, if_statement; 12, expression_statement; 13, expression_statement; 14, return_statement; 15, identifier:before; 16, None; 17, identifier:after; 18, None; 19, identifier:limit; 20, None; 21, comment:"""
          Get activities for authenticated user sorted by newest first.
  
          http://strava.github.io/api/v3/activities/
  
  
          :param before: Result will start with activities whose start date is
                         before specified date. (UTC)
          :type before: datetime.datetime or str or None
  
          :param after: Result will start with activities whose start date is after
                        specified value. (UTC)
          :type after: datetime.datetime or str or None
  
          :param limit: How many maximum activities to return.
          :type limit: int or None
  
          :return: An iterator of :class:`stravalib.model.Activity` objects.
          :rtype: :class:`BatchedResultsIterator`
          """; 22, identifier:before; 23, block; 24, identifier:after; 25, block; 26, assignment; 27, assignment; 28, call; 29, expression_statement; 30, expression_statement; 31, identifier:params; 32, call; 33, identifier:result_fetcher; 34, call; 35, identifier:BatchedResultsIterator; 36, argument_list; 37, assignment; 38, assignment; 39, identifier:dict; 40, argument_list; 41, attribute; 42, argument_list; 43, keyword_argument; 44, keyword_argument; 45, keyword_argument; 46, keyword_argument; 47, identifier:before; 48, call; 49, identifier:after; 50, call; 51, keyword_argument; 52, keyword_argument; 53, identifier:functools; 54, identifier:partial; 55, attribute; 56, string; 57, dictionary_splat; 58, identifier:entity; 59, attribute; 60, identifier:bind_client; 61, identifier:self; 62, identifier:result_fetcher; 63, identifier:result_fetcher; 64, identifier:limit; 65, identifier:limit; 66, attribute; 67, argument_list; 68, attribute; 69, argument_list; 70, identifier:before; 71, identifier:before; 72, identifier:after; 73, identifier:after; 74, attribute; 75, identifier:get; 76, string_content:/athlete/activities; 77, identifier:params; 78, identifier:model; 79, identifier:Activity; 80, identifier:self; 81, identifier:_utc_datetime_to_epoch; 82, identifier:before; 83, identifier:self; 84, identifier:_utc_datetime_to_epoch; 85, identifier:after; 86, identifier:self; 87, identifier:protocol
code: def get_activities(self, before=None, after=None, limit=None):
          """
          Get activities for authenticated user sorted by newest first.
  
          http://strava.github.io/api/v3/activities/
  
  
          :param before: Result will start with activities whose start date is
                         before specified date. (UTC)
          :type before: datetime.datetime or str or None
  
          :param after: Result will start with activities whose start date is after
                        specified value. (UTC)
          :type after: datetime.datetime or str or None
  
          :param limit: How many maximum activities to return.
          :type limit: int or None
  
          :return: An iterator of :class:`stravalib.model.Activity` objects.
          :rtype: :class:`BatchedResultsIterator`
          """
  
          if before:
              before = self._utc_datetime_to_epoch(before)
  
          if after:
              after = self._utc_datetime_to_epoch(after)
  
          params = dict(before=before, after=after)
          result_fetcher = functools.partial(self.protocol.get,
                                             '/athlete/activities',
                                             **params)
  
          return BatchedResultsIterator(entity=model.Activity,
                                        bind_client=self,
                                        result_fetcher=result_fetcher,
                                        limit=limit)