tag:help.tenderapp.com,2008-11-12:/discussions/problems/64583-problem-with-apiTender: Discussion 2018-12-10T11:59:57Ztag:help.tenderapp.com,2008-11-12:Comment/323941442014-04-03T14:16:22Z2018-12-10T11:59:57ZProblem with API<div><p>Hey guys,</p>
<p>when I use your API to get all open discussions, the page parameter does not seem to have any effect. I fetch the first page like so</p>
<pre>
<code>$ curl -H "Accept: application/vnd.tender-v1+json" \
http://api.tenderapp.com/[[my_site]]/discussions/open?auth=[[auth_key]]&sort=created&page=1</code>
</pre>
<p>... and it gives me a total: 97 and per_page: 30, so that gives me 4 pages.</p>
<pre>
<code>$ curl -H "Accept: application/vnd.tender-v1+json" \
http://api.tenderapp.com/[[my_site]]/discussions/open?auth=[[auth_key]]&sort=created&page=2</code>
</pre>
<p>gives me the exact same result set. :( Likewise for pages 3 and 4.</p>
<p>Also what's weird is that this works:</p>
<pre>
<code>$ curl -H "Accept: application/vnd.tender-v1+json" \
http://api.tenderapp.com/[[my_site]]/discussions/open?auth=[[auth_key]]&sort=created&page=1</code>
</pre>
<p>... but this does not:</p>
<pre>
<code>$ curl -H "Accept: application/vnd.tender-v1+json" \
http://api.tenderapp.com/[[my_site]]/discussions/open?page=1&auth=[[auth_key]]&sort=created</code>
</pre>
<p>even though it just has "auth" and "page" reversed.</p>
<p>Any ideas?</p>
<p>Kind regards,<br>
Tim</p>
<p>Co-Founder Transloadit<br>
@tim_kos</p></div>Tim Koschützkitag:help.tenderapp.com,2008-11-12:Comment/323941442014-04-03T16:35:22Z2014-04-03T16:35:22ZProblem with API<div><p>Hey Tim,</p>
<p>I'm taking a look.</p></div>Julientag:help.tenderapp.com,2008-11-12:Comment/323941442014-04-03T16:45:58Z2014-04-03T16:45:58ZProblem with API<div><p>Hi Tim,</p>
<p>I just tested all these commands, with your API key, on your
site, and they all worked as expected. I had the correct result on
each page, and the order of parameters had no influence.</p>
<p>Are you actually using <code>curl</code>, or do you have some
code in a different programming language (ruby, php, python,
..)?</p>
<p>Thanks.</p></div>Julientag:help.tenderapp.com,2008-11-12:Comment/323941442014-04-03T16:54:52Z2018-12-10T11:59:57ZProblem with API<div><p>Hey there,</p>
<p>I use this: <a href="https://github.com/tim-kos/unreplied_tender_discussions">https://github.com/tim-kos/unreplied_tender_discussions</a></p>
<p>I logged the URLs that it uses for each API call and they are the ones I listed.</p>
<p>Maybe I am missing something?</p>
<p>Kind regards,<br>
Tim</p>
<p>Co-Founder Transloadit<br>
@tim_kos</p></div>Tim Koschützkitag:help.tenderapp.com,2008-11-12:Comment/323941442014-04-03T17:16:00Z2014-04-03T17:16:00ZProblem with API<div><p>I took a brief look and there is probably something wrong in
that lib.</p>
<p>What exactly are you trying to do? Simply get a list of URLs or
integrate this into a node app? If you just want a list of URLs,
and you tell me exactly what you need, I can write a single shell
command that will give you the result. It will be faster than
trying to debug the node module.</p></div>Julientag:help.tenderapp.com,2008-11-12:Comment/323941442014-04-03T18:13:43Z2018-12-10T11:59:57ZProblem with API<div><p>I would like to get the html_href's of all open discussions that have had 1<br>
comment so far (as in no reply yet).</p></div>Tim Koschützkitag:help.tenderapp.com,2008-11-12:Comment/323941442014-04-03T18:47:35Z2014-04-03T18:47:35ZProblem with API<div><p>Hey Tim,</p>
<p>I also noticed that your spam folder is pretty full. Would you
like me to empty it for you? It is much easier to deal with spam
and false positives with an empty spam folder. In general, we
recommend going through your spam folder every day or at least
every week, restore any false positive, and delete the rest. This
ensures that the spam engine gets trained correctly, and it's much
easier to spot false positives inside a small list than a large
one.</p>
<p>So just let me know if you 'd like me to do that for you. I can
also delete everything older than X days, if you want to go through
the last week manually for example.</p>
<p>Cheers.</p></div>Julientag:help.tenderapp.com,2008-11-12:Comment/323941442014-04-03T23:20:46Z2014-04-03T23:20:46ZProblem with API<div><p>Hey Tim,</p>
<p>Using any <a href="https://github.com/jmhodges/jsonpp">JSON
prettyfier</a>, you could do:</p>
<pre>
<code>for page in 1 2 3 4 5 6 7 8 9 10; do
curl -s -H "Accept: application/vnd.tender-v1+json" \
"http://api.tenderapp.com/SITE/discussions/new?auth=TOKEN&page=$page" \
| jsonpp | grep html_href | sed "s/.*\(http.*\)\".*/\1/"
done</code>
</pre>
<p>It's unlikely that you would have 10 pages, so you could
probably reduce that.</p></div>Julientag:help.tenderapp.com,2008-11-12:Comment/323941442014-04-04T06:06:47Z2018-12-10T11:59:57ZProblem with API<div><p>Alright, thanks.</p>
<p>So "new" is the state that I was looking for, that also helps. I'll still try to figure out what's wrong with my lib, but thanks for sharing this.</p>
<p>This can be closed now.</p></div>Tim Koschützki