<commit_before>-extends "base.html"

-block title
  -trans "Restful API documentation"

-block content

  %h1
    Restful API

  -blocktrans
    %p
      Memopol2 offers a simple Rest API to access nearly all its data. Following the Restful principles it is self describing, starting at the root you'll be able to get everywhere via urls.

    %p
      You can access the api here:

    %p
      %code
          {{ root_url }}/api/v1/?format=json

    %p
      The best way to play with it is to use curl:

    %p
      %code
          curl "{{ root_url }}/api/v1/?format=json" | python -m json.tool

    %p
      Note: you can change "json" with either "xml" or "yaml".

    %p
      We generate a representation of the schema of our data, you can find it <a href="https://projets.lqdn.fr/projects/mempol/files">here</a> (note: not all what you see on it is accessible via the API, but the vast majority of it).

    %p
      This API is generated using <a href="http://tastypieapi.org/">tastypie</a>, you can read the usage documentation <a href="http://django-tastypie.readthedocs.org/en/latest/interacting.html#fetching-data">here</a>.

    %p
      If you aren't interested in Memopol2-related data maybe the <a href="http://parltrack.euwiki.org/dumps/">dumps from parltarck</a> will be better for you for the European Parliament part or <a href="http://cpc.regardscitoyens.org/trac/wiki/API">nosdeputes.fr dumps</a> for the french side.

    %h1
      Link to a MEP's page

    %p
      If you are playing with data from the European Parliament but not
      Memopol's one and you want to link to MEP's page, you might encounter
      some issues since we aren't using obvious ids in ours url. To fix this,
      we offer a simplier API, assuming that you have the MEP's ids of the
      European Parliament website (the "96744" in this
      <a href="http://www.europarl.europa.eu/meps/en/96744/Jose_BOV%C3%89.html">url</a> for example).

    %p
      The API is:
      %code
        {{ root_url }}/europe/parliament/deputy_from_ep_id/&lt;ep_id&gt;/

    %p
      For example: <a href="{{ root_url }}/europe/parliament/deputy_from_ep_id/96744">{{ root_url }}/europe/parliament/deputy_from_ep_id/96744/</a><commit_msg>[fix] msising '/' is some url in the doc<commit_after>-extends "base.html"

-block title
  -trans "Restful API documentation"

-block content

  %h1
    Restful API

  -blocktrans
    %p
      Memopol2 offers a simple Rest API to access nearly all its data. Following the Restful principles it is self describing, starting at the root you'll be able to get everywhere via urls.

    %p
      You can access the api here:

    %p
      %code
          {{ root_url }}/api/v1/?format=json

    %p
      The best way to play with it is to use curl:

    %p
      %code
          curl "{{ root_url }}/api/v1/?format=json" | python -m json.tool

    %p
      Note: you can change "json" with either "xml" or "yaml".

    %p
      We generate a representation of the schema of our data, you can find it <a href="https://projets.lqdn.fr/projects/mempol/files">here</a> (note: not all what you see on it is accessible via the API, but the vast majority of it).

    %p
      This API is generated using <a href="http://tastypieapi.org/">tastypie</a>, you can read the usage documentation <a href="http://django-tastypie.readthedocs.org/en/latest/interacting.html#fetching-data">here</a>.

    %p
      If you aren't interested in Memopol2-related data maybe the <a href="http://parltrack.euwiki.org/dumps/">dumps from parltarck</a> will be better for you for the European Parliament part or <a href="http://cpc.regardscitoyens.org/trac/wiki/API">nosdeputes.fr dumps</a> for the french side.

    %h1
      Link to a MEP's page

    %p
      If you are playing with data from the European Parliament but not
      Memopol's one and you want to link to MEP's page, you might encounter
      some issues since we aren't using obvious ids in ours url. To fix this,
      we offer a simplier API, assuming that you have the MEP's ids of the
      European Parliament website (the "96744" in this
      <a href="http://www.europarl.europa.eu/meps/en/96744/Jose_BOV%C3%89.html">url</a> for example).

    %p
      The API is:
      %code
        {{ root_url }}/europe/parliament/deputy_from_ep_id/&lt;ep_id&gt;/

    %p
      For example: <a href="{{ root_url }}/europe/parliament/deputy_from_ep_id/96744/">{{ root_url }}/europe/parliament/deputy_from_ep_id/96744/</a>
{'fraction_non_alphanumeric': 0.10589812332439678, 'fraction_numerical': 0.012957998212689902, 'mean_word_length': 2.876190476190476, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 31, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, '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': '1984101', 'n_tokens_mistral': 1539, 'n_tokens_neox': 1438, 'n_words': 526}