Search the Community
Showing results for tags 'imgur api'.
-
Hi, i'm trying to implement Imgur API functions in an AutoIt program. I successfully coded the oAuth2 Authentication and i'm testing some Imgur functions. Example : https://api.imgur.com/3/account/me/images The string received is like : {"data":[{"id":"fd6f54s","title":null,"description":null,"datetime":1574502473,"type":"image\/png","animated":false,"width":1147,"height":715,"size":53516,"views":18,"bandwidth":963288,"vote":null,"favorite":false,"nsfw":null,"section":null,"account_url":"ACCOUNT","account_id":ACCOUNTID,"is_ad":false,"in_most_viral":false,"has_sound":false,"tags":[],"ad_type":0,"ad_url":"","edited":"0","in_gallery":false,"deletehash":"d6f5sd4fsf","name":"image","link":"https:\/\/i.imgur.com\/fd6f54s.png"} I'm using JSON.au3 UDF and i don't manage to make it working : Local $Obj = Json_Decode($hRequestSSL) Local $Links = Json_Get($Obj, '["data"]["link"]') The Json_Decode sends in console : "E:\Portable\Dev\AutoIt3\IncludeP\JSON.au3" (374) : ==> Variable must be of type "Object".: Return $Object.Keys() Return $Object^ ERROR It says it's not an object or i have seen in some UDF that Json_Decode takes a string as parameter. I don't know what's wrong.
-
This is an AutoIt UDF to help you upload images using Imgur API. Simple example: #NoTrayIcon #include 'Imgur.au3' Global $fp = FileOpenDialog('Open', @ScriptDir, 'Images (*.jpg;*.gif;*.png;*.bmp)', 1) If Not @error Then Local $image_url = _imgur_upload($fp) If @error Then MsgBox(16 + 262144, 'Error', 'Upload image failed!') Else ; Open with default browser ShellExecute($image_url) EndIf EndIfDownload: Imgur UDF by Juno_okyo.zip Github: https://github.com/J2TeaM/AutoIt-Imgur-UDF ----- In the UDF, I have used Base64 and JSON UDF by @Ward. Thank you!