<p dir="auto">Adds <code class="notranslate">update_date</code> to notes api output.</p>
<p dir="auto">Internally, notes have updated_at, created_at and closed_at dates. Create and close dates are available through the api, update date is not. Usually you can look at the date of the last note comment to figure out update_date. Except it's not always possible. If the last comment is hidden the date is going to be incorrect.</p>
<p dir="auto">Why do you need update date? Note search results can be sorted by update date. The number of returned notes is limited, the default limit is 100. What if you want to get the next 100 notes? You can add a <code class="notranslate">from</code> or <code class="notranslate">to</code> parameter to your search call with the date of a last note you got as a value.* That way you can skip the first 100 notes you already received.**</p>
<p dir="auto">I named the added key/element <code class="notranslate">update_date</code>, similar to existing <code class="notranslate">date_created</code> and <code class="notranslate">date_closed</code> keys/elements, if we ignore one naming inconsistency in json where <code class="notranslate">closed_at</code> is used instead of <code class="notranslate">date_closed</code>. I didn't add update date to rss, because there's no good possible element inside <code class="notranslate"><item></code> for it.</p>
<p dir="auto">* actually date + 1 second for <code class="notranslate">to</code><br>
** except for same-second notes</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/3578'>https://github.com/openstreetmap/openstreetmap-website/pull/3578</a></p>

<h4>Commit Summary</h4>
<ul>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/3578/commits/be7a78e3d2bb41f84403070a7255be6b2ed3bd4a" class="commit-link">be7a78e</a>  Note update date in xml, json, rss api output formats</li>
</ul>

<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/3578/files">4 files</a>)</p>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3578/files#diff-8e70c530a3e7f6eb777b75ec26204721dd896dedf08d20582adb5da76aba544c">app/views/api/notes/_note.gpx.builder</a>
    (1)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3578/files#diff-a14835243072d71830ba15ff480de24e3146811fabdf73b7e35670af209fbf05">app/views/api/notes/_note.json.jbuilder</a>
    (1)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3578/files#diff-143dab9bcdf18ed43c02d5c815e4fb922faf69c55a45c4c8af8c7cb07af310e9">app/views/api/notes/_note.xml.builder</a>
    (1)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3578/files#diff-b4cc80ae5a4279eef2a7494cb8c489220ce03acaf36932b2042247df9d316908">test/controllers/api/notes_controller_test.rb</a>
    (4)
  </li>
</ul>

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

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3578">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLNNQHTBZEPQKIG5JIDVQBKEDANCNFSM5ZIT6BNQ">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLP7XQIOYAGJMKYPVPLVQBKEDA5CNFSM5ZIT6BN2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4TA2L2QA.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/3578</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/3578",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/3578",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>