<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using ServiceStack.ServiceHost;
using ServiceStack.ServiceInterface;
using System.Configuration;
using System.Net;
using System.IO;

namespace GtfsService
{
	[Route("/agencies")]
	public class Agencies
	{
	}

	public class AgenciesService: Service
	{
		/// <summary>
		/// Redirects to the gtfs-data-exchange.com agencies list.
		/// </summary>
		/// <param name="request"></param>
		public void Any(Agencies request)
		{
			var url = ConfigurationManager.AppSettings["gtfs-url"].TrimEnd('/') + "/api/agencies";
			base.Response.RedirectToUrl(url);
		}
	}

}<commit_msg>Can now retrieve per-agency data.<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using ServiceStack.ServiceHost;
using ServiceStack.ServiceInterface;
using System.Configuration;
using System.Net;
using System.IO;

namespace GtfsService
{
	/// <summary>
	/// Gets a list of agencies.
	/// </summary>
	[Route("/agencies")]
	[Route("/agencies/{dataexchange_id}")]
	[Route("/agency/{dataexchange_id}")]
	public class Agencies
	{
		public string dataexchange_id { get; set; }
	}

	public class AgenciesService: Service
	{
		/// <summary>
		/// Redirects to the gtfs-data-exchange.com agencies list.
		/// </summary>
		/// <param name="request"></param>
		public void Any(Agencies request)
		{
			Console.WriteLine(base.Request.GetFormatModifier());
			var url = ConfigurationManager.AppSettings["gtfs-url"].TrimEnd('/');
			var urlSuffix = string.IsNullOrWhiteSpace(request.dataexchange_id) ? "/api/agencies" : string.Format("/api/agency?agency={0}", request.dataexchange_id);
			url = url + urlSuffix;
			base.Response.RedirectToUrl(url);
		}
	}

}
{'fraction_non_alphanumeric': 0.14584511023176935, 'fraction_numerical': 0.0005652911249293386, 'mean_word_length': 4.315315315315315, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '7113440', 'n_tokens_mistral': 602, 'n_tokens_neox': 566, 'n_words': 121}