Problem with API
Hey guys,
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
$ curl -H "Accept: application/vnd.tender-v1+json" \
http://api.tenderapp.com/[[my_site]]/discussions/open?auth=[[auth_key]]&sort=created&page=1
... and it gives me a total: 97 and per_page: 30, so that gives me 4 pages.
$ curl -H "Accept: application/vnd.tender-v1+json" \
http://api.tenderapp.com/[[my_site]]/discussions/open?auth=[[auth_key]]&sort=created&page=2
gives me the exact same result set. :( Likewise for pages 3 and 4.
Also what's weird is that this works:
$ curl -H "Accept: application/vnd.tender-v1+json" \
http://api.tenderapp.com/[[my_site]]/discussions/open?auth=[[auth_key]]&sort=created&page=1
... but this does not:
$ curl -H "Accept: application/vnd.tender-v1+json" \
http://api.tenderapp.com/[[my_site]]/discussions/open?page=1&auth=[[auth_key]]&sort=created
even though it just has "auth" and "page" reversed.
Any ideas?
Kind regards,
Tim
Co-Founder Transloadit
@tim_kos
Discussions are closed to public comments.
If you need help with Tender please
start a new discussion.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by Julien on 03 Apr, 2014 04:35 PM
Hey Tim,
I'm taking a look.
2 Posted by Julien on 03 Apr, 2014 04:45 PM
Hi Tim,
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.
Are you actually using
curl
, or do you have some code in a different programming language (ruby, php, python, ..)?Thanks.
3 Posted by Tim Koschützki on 03 Apr, 2014 04:54 PM
Hey there,
I use this: https://github.com/tim-kos/unreplied_tender_discussions
I logged the URLs that it uses for each API call and they are the ones I listed.
Maybe I am missing something?
Kind regards,
Tim
Co-Founder Transloadit
@tim_kos
4 Posted by Julien on 03 Apr, 2014 05:16 PM
I took a brief look and there is probably something wrong in that lib.
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.
5 Posted by Tim Koschützki on 03 Apr, 2014 06:13 PM
I would like to get the html_href's of all open discussions that have had 1
comment so far (as in no reply yet).
6 Posted by Julien on 03 Apr, 2014 06:47 PM
Hey Tim,
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.
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.
Cheers.
7 Posted by Julien on 03 Apr, 2014 11:20 PM
Hey Tim,
Using any JSON prettyfier, you could do:
It's unlikely that you would have 10 pages, so you could probably reduce that.
8 Posted by Tim Koschützki on 04 Apr, 2014 06:06 AM
Alright, thanks.
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.
This can be closed now.
Julien closed this discussion on 04 Apr, 2014 02:04 PM.