<p>This PR adds an additional endpoint to the Map Notes API which allows to get the latest notes which are available. It can be accessed at <code>/api/0.6/notes/latest</code> and takes the same parameters as e.g. the search endpoint (<code>limit</code>, <code>closed</code>). The data can be returned as <code>.xml</code>, <code>.json</code>, <code>.rss</code> or <code>.gpx</code>.<br>
A possible use case for this endpoint is that applications could request the latest notes and show them on a map/list and users can resolve the notes or ask questions because I think the faster someone comments/resolves a note you created not that long ago the higher is the possibility that the creator of the note wants to answer the question and did not forget what the note was all about.<br>
In the end it might also help to reduce the amount of created notes at all and thus making the map a better map <g-emoji class="g-emoji" alias="smile" fallback-src="https://assets-cdn.github.com/images/icons/emoji/unicode/1f604.png">😄</g-emoji></p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/openstreetmap/openstreetmap-website/pull/1953'>https://github.com/openstreetmap/openstreetmap-website/pull/1953</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Add an API endpoint to get the latest notes</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1953/files#diff-0">app/controllers/notes_controller.rb</a>
    (18)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1953/files#diff-1">config/routes.rb</a>
    (1)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/1953.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/1953.patch</a></li>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/1953.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/1953.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1953">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABWnLWgnIdn9GLUwjqpbFwx1fmjFih5Nks5uUWgNgaJpZM4WMaxe">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABWnLSeygqq_XpCu82MxaTELb6Jfbl8tks5uUWgNgaJpZM4WMaxe.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/openstreetmap/openstreetmap-website","title":"openstreetmap/openstreetmap-website","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/openstreetmap/openstreetmap-website"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"Add an API endpoint to get the latest notes (#1953)"}],"action":{"name":"View Pull Request","url":"https://github.com/openstreetmap/openstreetmap-website/pull/1953"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/1953",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/1953",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
},
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "Add an API endpoint to get the latest notes (#1953)",
"sections": [
{
"text": "",
"activityTitle": "**ENT8R**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@ENT8R",
"facts": [

]
},
{
"title": "Commit Summary",
"facts": [
{
"name": "7dd7d41",
"value": "Add an API endpoint to get the latest notes"
}
]
},
{
"title": "File Changes",
"facts": [
{
"name": "Modified",
"value": "[app/controllers/notes_controller.rb](https://github.com/openstreetmap/openstreetmap-website/pull/1953/files#diff-0) (18 changes)"
},
{
"name": "Modified",
"value": "[config/routes.rb](https://github.com/openstreetmap/openstreetmap-website/pull/1953/files#diff-1) (1 changes)"
}
]
}
],
"potentialAction": [
{
"name": "Add a comment",
"@type": "ActionCard",
"inputs": [
{
"isMultiLine": true,
"@type": "TextInput",
"id": "IssueComment",
"isRequired": false
}
],
"actions": [
{
"name": "Comment",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"openstreetmap/openstreetmap-website\",\n\"issueId\": 1953,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}"
}
]
},
{
"name": "Close pull request",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"PullRequestClose\",\n\"repositoryFullName\": \"openstreetmap/openstreetmap-website\",\n\"pullRequestId\": 1953\n}"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/openstreetmap/openstreetmap-website/pull/1953"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/openstreetmap/openstreetmap-website/pull/1953.patch"
}
],
"@type": "OpenUri",
"name": "View patch"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/openstreetmap/openstreetmap-website/pull/1953.diff"
}
],
"@type": "OpenUri",
"name": "View diff"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 372354142\n}"
}
],
"themeColor": "26292E"
}
]</script>