<commit_before><% @title = "Application Programming Interface - API" %>

<%= render :partial => 'sidebar' %>

<div id="left_column_flip">
<h1><%=@title %></h1>

<h2> Introduction </h2>

<p>This page explains how programmers can make other websites and software
interact with <%= site_name %> via an "API".
</p>

<p><%= site_name %> does not have a full API yet, but we are gradually adding
lots of things that are similar in use to an API as they are requested.
</p>

<hr>

<h2> 1. Linking to new requests </h2>

<p>To encourage your users to make links to a particular public authority, use URLs of the form
<%= link_to new_request_to_body_url(:url_name => "liverpool_city_council") , new_request_to_body_url(:url_name => "liverpool_city_council") %>. 
These are the parameters you can add to those URLs, either in the URL or from a form.

<ul>
    <li> <strong>title</strong> - default summary of the new request.</li>
    <li> <strong>default_letter</strong> - default text of the body of the letter. The salutation (Dear...) and signoff (Yours...) are wrapped round this. </li>
    <li> <strong>body</strong> - as an alternative to default_letter, this sets the default entire text of the request, so you can customise the salutation and signoff. </li>
    <li> <strong>tags</strong> - space separated list of tags, so you can find and link up any requests made later, e.g. <em>openlylocal spending_id:12345</em>. The : indicates it is a machine tag. The values of machine tags may also include colons, useful for URIs.<commit_msg>Fix typo.<commit_after><% @title = "Application Programming Interface - API" %>

<%= render :partial => 'sidebar' %>

<div id="left_column_flip">
<h1><%=@title %></h1>

<h2> Introduction </h2>

<p>This page explains how programmers can make other websites and software
interact with <%= site_name %> via an "API".
</p>

<p><%= site_name %> does not have a full API yet, but we are gradually adding
lots of things that are similar in use to an API as they are requested.
</p>

<hr>

<h2> 1. Linking to new requests </h2>

<p>To encourage your users to make requests to a particular public authority, use URLs of the form:
<%= link_to new_request_to_body_url(:url_name => "liverpool_city_council") , new_request_to_body_url(:url_name => "liverpool_city_council") %>.
These are the parameters you can add to those URLs, either in the URL or from a form.

<ul>
    <li> <strong>title</strong> - default summary of the new request.</li>
    <li> <strong>default_letter</strong> - default text of the body of the letter. The salutation (Dear...) and signoff (Yours...) are wrapped round this. </li>
    <li> <strong>body</strong> - as an alternative to default_letter, this sets the default entire text of the request, so you can customise the salutation and signoff. </li>
    <li> <strong>tags</strong> - space separated list of tags, so you can find and link up any requests made later, e.g. <em>openlylocal spending_id:12345</em>. The : indicates it is a machine tag. The values of machine tags may also include colons, useful for URIs.
{'fraction_non_alphanumeric': 0.11534701857282502, 'fraction_numerical': 0.007820136852394917, 'mean_word_length': 4.293103448275862, 'pattern_counts': {'":': 0, '<': 77, '<?xml version=': 0, '>': 83, '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': '3185952', 'n_tokens_mistral': 978, 'n_tokens_neox': 923, 'n_words': 414}