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.
- United Kingdom
- Community Superstar
- 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 2-3 years
- Microlancer Beta Tester
- Bought between 100 and 499 items
- Referred between 10 and 49 users
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.json2. 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)
aaranmcguire said
heyhope 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.json2. 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.jsonThe 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 
- United Kingdom
- Community Superstar
- 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 2-3 years
- Microlancer Beta Tester
- Bought between 100 and 499 items
- Referred between 10 and 49 users
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
aaranmcguire said
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 ?
- United Kingdom
- Community Superstar
- 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 2-3 years
- Microlancer Beta Tester
- Bought between 100 and 499 items
- Referred between 10 and 49 users
chaoscod3r said
aaranmcguire saidYes, 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 ?
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
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.
aaranmcguire said
chaoscod3r saidnope… 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.
aaranmcguire saidYes, 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 ?
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
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 ?
- United Kingdom
- Community Superstar
- 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 2-3 years
- Microlancer Beta Tester
- Bought between 100 and 499 items
- Referred between 10 and 49 users
chaoscod3r said
aaranmcguire saidYeah, 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… 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.
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.
aaranmcguire said
chaoscod3r saidNope, 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.
aaranmcguire saidYeah, 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… 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, 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 
- Envato Staff
- Reviewer
- Sold between 10 000 and 50 000 dollars
- Author was Featured
- Item was Featured
- Has been a member for 4-5 years
- Bought between 50 and 99 items
- Contributed a Tutorial to a Tuts+ Site
- Beta Tester
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.
