Anyways, just clicking the “try it out” button on the api docs page, returns an “Unauthorized operation” message.
Cool maybe they’re still working on it. I’m just going to load that endpoint and new permission into my app and just see what data comes back after buyers approve it (behind the scenes). Then if it’s useful I can stop asking for purchase codes
I made some (kinda cool) live banners for item pages. Enjoy!
Version 2: Separate images that fade-in once the data has been calculated server side:
It currently shows:
- Number of people viewing the page (based on IP address and a timeout)
- When the last purchase was made
- How many sales were made in recent API history
- How many 5 star ratings the item has received (curl, regex, bad, no api yet)
How it looks: live preview.
Code is (messy as usual) on Github: https://github.com/dtbaker/envato-live-sales-gifUsage:
- Upload everything from github to a new folder on your website (ignore the test stuff if you like)
- Probably works best without nginx or anything infront of apache. Needs to stream data asap
- Register a new personal token on http://build.envato.com/
- Tick “View your items sales history” and “View your account financial history”
- Paste your personal token into the top of config.php
- Adjust the “name” of your item to find in config.php
<img src="http://yourwebsite.com/gif.php" />to the top of your item page.
post back here with a link to your item page showing it in use. If you make any changes or improvements please shoot them back my way so I can include them for everyone (I’m thinking, different themes + more types of notifications).
Because this is a “Streaming GIF” we can render cached information to the user quickly while we calculate other slower information (e.g. API calls) and keep appending to the animation as we build more data.
I had these grand plans of making streaming GIF or MJPEG sales notification banner. So it would flash “Someone just bought this item!” exactly when someone made a purchase. However weird streaming GIF loop issues and MJPEG browser support put that idea to bed. For now it’s just a rotating banner showing information about the current item, without any “live/just happened” events.
Edit: if someone can play with
animate_image_data() to get a smoother ease-in-ease-out transition on the y-axis that would be great! It’s 11pm here and my brain isn’t working.
I just went to create a token for something I’m building and noticed this new permission
* BIG GRIN *
Anyone used it yet???
If you give out admin access to WordPress then people will continue to break your demo. Please try to come up with another way to provide a more secure demonstration.
Consider resetting the wordpress database every 30 minutes or so as well. This way if people delete wordpress pages or posts, or change settings, they will come back automatically.
This past week I have done a small modification for $8 and another tricky modification for $140
The biggest modification I was willing to take on at the start of the year was $800. Anything more than that I just don’t have the time to build so I tell them to find someone on http://studio.envato.com/ or ask here on the forums.