135 posts
  • Has been a member for 2-3 years
  • Exclusive Author
  • Sold between 1 000 and 5 000 dollars
  • Denmark
  • Bought between 100 and 499 items
  • Referred between 10 and 49 users
rolandjitsu says

Hey guys,

I’ve started on working with Envato API , I’m learning just the basics, because it’s the first time I’m working with curl.

I’ve found an interesting wrapper for it ( API Wrapper ), and there a method which can show all new items within a limit you set. But what I’m looking for is a way to grab in the same way all the items I have for sale without knowing how many or adding that limit and maybe not limited to one marketplace.

Does anyone know such a method or help me come with a solution that would be built in the same manner as the wrapper class I have above ?

Cheers, Roland.

972 posts
  • United Kingdom
  • Attended a Community Meetup
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Sold between 5 000 and 10 000 dollars
  • Has been a member for 3-4 years
  • Microlancer Beta Tester
  • Bought between 100 and 499 items
  • Referred between 10 and 49 users
  • Exclusive Author
aaranmcguire says

hey

hope this helps;

1. you can get all different market place items from 1 request so I would recommend you do a request to see what site the author has file on, the request is..
http://marketplace.envato.com/api/edge/user-items-by-site:USERNAME.json
2. then do a array from that wil all the sites the user is apart of then do foreach doing requests for.
http://marketplace.envato.com/api/v3/new-files-from-user:USERNAME,SITE.json

The API says it returns 10 but it does way more than that (just hoping they dont fix that)

135 posts
  • Has been a member for 2-3 years
  • Exclusive Author
  • Sold between 1 000 and 5 000 dollars
  • Denmark
  • Bought between 100 and 499 items
  • Referred between 10 and 49 users
rolandjitsu says

hey

hope this helps;

1. you can get all different market place items from 1 request so I would recommend you do a request to see what site the author has file on, the request is..
http://marketplace.envato.com/api/edge/user-items-by-site:USERNAME.json
2. then do a array from that wil all the sites the user is apart of then do foreach doing requests for.
http://marketplace.envato.com/api/v3/new-files-from-user:USERNAME,SITE.json
The API says it returns 10 but it does way more than that (just hoping they dont fix that)

I’m using the second method, to get items by marketplace. I’ll try the first one and see what I get.

Thanks Aaran :)

972 posts
  • United Kingdom
  • Attended a Community Meetup
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Sold between 5 000 and 10 000 dollars
  • Has been a member for 3-4 years
  • Microlancer Beta Tester
  • Bought between 100 and 499 items
  • Referred between 10 and 49 users
  • Exclusive Author
aaranmcguire says

The 1st one is just so you can lessen the requests instead of requesting items on each site without knowing if they have items on there

135 posts
  • Has been a member for 2-3 years
  • Exclusive Author
  • Sold between 1 000 and 5 000 dollars
  • Denmark
  • Bought between 100 and 499 items
  • Referred between 10 and 49 users
rolandjitsu says

The 1st one is just so you can lessen the requests instead of requesting items on each site without knowing if they have items on there

Yes, I’ve just tested it and I got the number of items per site, but can I display all those items ? Without having the marketplace name ?

972 posts
  • United Kingdom
  • Attended a Community Meetup
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Sold between 5 000 and 10 000 dollars
  • Has been a member for 3-4 years
  • Microlancer Beta Tester
  • Bought between 100 and 499 items
  • Referred between 10 and 49 users
  • Exclusive Author
aaranmcguire says


The 1st one is just so you can lessen the requests instead of requesting items on each site without knowing if they have items on there
Yes, I’ve just tested it and I got the number of items per site, but can I display all those items ? Without having the marketplace name ?

nope… but what you can do, is as you have the stores the user is affiliated with you then request them with the 2nd API i said.

135 posts
  • Has been a member for 2-3 years
  • Exclusive Author
  • Sold between 1 000 and 5 000 dollars
  • Denmark
  • Bought between 100 and 499 items
  • Referred between 10 and 49 users
rolandjitsu says



The 1st one is just so you can lessen the requests instead of requesting items on each site without knowing if they have items on there
Yes, I’ve just tested it and I got the number of items per site, but can I display all those items ? Without having the marketplace name ?
nope… but what you can do, is as you have the stores the user is affiliated with you then request them with the 2nd API i said.

Yeah, that’s brilliant. There’ll be no problem if the sitename is “GraphicRiver” instead of small caps “graphicriver” when making the request wouldn’t it ?

972 posts
  • United Kingdom
  • Attended a Community Meetup
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Sold between 5 000 and 10 000 dollars
  • Has been a member for 3-4 years
  • Microlancer Beta Tester
  • Bought between 100 and 499 items
  • Referred between 10 and 49 users
  • Exclusive Author
aaranmcguire says


nope… but what you can do, is as you have the stores the user is affiliated with you then request them with the 2nd API i said.
Yeah, that’s brilliant. There’ll be no problem if the sitename is “GraphicRiver” instead of small caps “graphicriver” when making the request wouldn’t it ?

Nope, not when i did mine.. i then put mine in a DB so i dont keep requesting… all the requests can add up on page load.

135 posts
  • Has been a member for 2-3 years
  • Exclusive Author
  • Sold between 1 000 and 5 000 dollars
  • Denmark
  • Bought between 100 and 499 items
  • Referred between 10 and 49 users
rolandjitsu says



nope… but what you can do, is as you have the stores the user is affiliated with you then request them with the 2nd API i said.
Yeah, that’s brilliant. There’ll be no problem if the sitename is “GraphicRiver” instead of small caps “graphicriver” when making the request wouldn’t it ?
Nope, not when i did mine.. i then put mine in a DB so i dont keep requesting… all the requests can add up on page load.

Yeah, I noticed that, I’ve also read about that. But this wrapper makes a cache folder where stores the json files with that data. After building my app I will probably go for a DB instead of a temp cache folder.

Thanks for the suggestion Aaran :D

358 posts
  • Envato Staff
  • Reviewer
  • Sold between 10 000 and 50 000 dollars
  • Has been a member for 4-5 years
  • Bought between 50 and 99 items
  • Contributed a Tutorial to a Tuts+ Site
  • Beta Tester
+4 more
Philo01 Reviewer says

Don’t forget that your API key could be blocked for a few hours if you make to many requests within a short amount of time. ;) So it’s recommended to always cache if you are running your app in a public environment.

by
by
by
by
by
by