Discussion about an Imgur extension

Hectate

  • *
  • Posts: 4643
So after messing around with the Tile API, it got me thinking of extensions but I didn't have an outstanding ideas of things that would be useful. Then earlier, when posting a behavior screenshot to the forum I thought to myself, "Wouldn't it be nice if I could just upload a screenshot from Stencyl directly to my Imgur account and then get the URL to paste into the thread in one simple step?"

And thus, the idea for an Imgur extension to Stencyl was born. I've been wanting to do something outside of my comfort zone for a while, and this feeds that need.

Here's my dilemma though. If I personally create this extension 100% as usual, it has to be registered with Imgur and all usage of it goes against the rate limiting they put in place. Specifically, "Each application can allow approximately 1,250 uploads per day or approximately 12,500 requests per day." Also, if Jon were to integrate it into Stencyl itself, then he would have to pay for API access due to the commercial nature of Stencyl.

So to "get around" that, I thought to myself; "Would it be bad to make anybody wanting to use this extension have to register their own version of it?" So that's the question I'm posting to everyone else. If I develop this extension, should I design it so each individual user can register it under their own Imgur account and provide their own OAuth keys to the software? Obviously, instructions on how to do so would need to be provided.

Thoughts?

« Last Edit: March 29, 2014, 07:15:57 am by Hectate »
:
:
Patience is a Virtue,
But Haste is my Life.
Proud member of the League of Idiotic Stencylers; doing things in Stencyl that probably shouldn't be done.

Hectate

  • *
  • Posts: 4643
I'm not sure why I was even worried about this; worst-case scenario nobody wants it or uses it except for me. I'm going to dig into this and see what I can see. Expect questions... cheers!

While I was exercising tonight I came up with the thought that the same could be done for text with Pastebin also, as well as other similar sites. But that's a separate thing for another time.

:
:
Patience is a Virtue,
But Haste is my Life.
Proud member of the League of Idiotic Stencylers; doing things in Stencyl that probably shouldn't be done.

GeorgeN

  • Posts: 859
I will use it also. I'm using Imgur for a long time.

Alexin

  • *
  • Posts: 3132
Quote from: Hectate
(...)) should I design it so each individual user can register it under their own Imgur account and provide their own OAuth keys to the software?

I would expect to some sort of authentication to access my own Imgur account.
"Find the fun"
alexin@stencyl.com

Hectate

  • *
  • Posts: 4643
Quote from: Hectate
(...)) should I design it so each individual user can register it under their own Imgur account and provide their own OAuth keys to the software?

I would expect to some sort of authentication to access my own Imgur account.
Yes of course. The intention is to allow pretty much anything that the Imgur API will permit me access to; including posting to your account or anonymously.

The issue is that, no matter the user submitting the content, connections to Imgur's API have to be registered to a specific app. So if I make an Imgur app to share here, and we submit a combined 1,250 uploads in a single day, that 1,251st upload will fail.

However, if each person registers their own version of the app, they'll get auth keys that are unique to "their" app. Thus, each user would have 1,250 max uploads per day and not have to share the limit.

That said, I did notice yesterday that Imgur does have a submission process for whitelisting API access. If I can get approved for that it'll render this discussion obsolete.

In every case, a user does have to positively approve the access to their account.
:
:
Patience is a Virtue,
But Haste is my Life.
Proud member of the League of Idiotic Stencylers; doing things in Stencyl that probably shouldn't be done.

Hectate

  • *
  • Posts: 4643
Jon, I've updated the sample toolset extension to be the core of my Imgur extension but I've come to an apparent showstopping hurdle. It doesn't seem that there's a callback to catch the screenshot action.

I think that if there was a callback that happened after the screenshot was successfully buffered (so there's no need to re-create that code) but before the file system "save as" box appeared, I could capture the image (another callback?) and send it to Imgur appropriately. This would also mean I didn't have to worry about where the user was capturing the screenshot; as far as the extension is concerned capturing a scene screenshot or a behavior's blocks is just nabbing the image data.

I'm planning on having an optional box appear (based on extension settings of course) that would let the user tweak that individual upload. Putting a simple three-way option at the bottom - Upload to Imgur, Save to Disk, Cancel - would still let everyone have the options to pick where they want to send it.

Can there be something like this or can you point me to where it's already available? An "onScreenCapture" and/or "getScreenCaptureImage" to trigger the extension and acquire the image data?

« Last Edit: January 23, 2014, 09:12:59 pm by Hectate »
:
:
Patience is a Virtue,
But Haste is my Life.
Proud member of the League of Idiotic Stencylers; doing things in Stencyl that probably shouldn't be done.

Hectate

  • *
  • Posts: 4643
Small update if anyone is curious;

I can upload an existing PNG anonymously and retrieve the URL afterward. It can be copied to the clipboard if desired.

Things to do:
Add OAuth stuff (should be easier now that I've done some XML parsing practice with the HTTP responses to get the URL) for non-anonymous uploading.
Figure out the encoding rules for a BufferedImage so that it doesn't have to be saved first. working 3/23
Fix the callback so it's smarter across multiple extensions.

« Last Edit: March 23, 2014, 07:05:52 am by Hectate »
:
:
Patience is a Virtue,
But Haste is my Life.
Proud member of the League of Idiotic Stencylers; doing things in Stencyl that probably shouldn't be done.

Stevetheipad

  • Posts: 1304
Depends if you are wanting this to be a consumer-friendly, everyday add-on or something geared to those who are more experienced. It sounds like the goal is to make things simpler and easier and therefore would be more geared towards everyday users so you'd want to have the uploading process not require each user to set things up.

Hectate

  • *
  • Posts: 4643
A brief update; both anonymous and non-anonymous upload are working. I've not yet tested on other people's accounts so we will see what happens when we get to that point. This will be ready for people to try out soon, perhaps this weekend or sometime next week. I'll get an early, ugly version out for people to try and then we'll tweak it from there once we know it functions properly in the wild.
:
:
Patience is a Virtue,
But Haste is my Life.
Proud member of the League of Idiotic Stencylers; doing things in Stencyl that probably shouldn't be done.