So… Since my dedup program has… kinda stalled while I try to figure out how to implement the actual identifying and displaying duplicate files, I’m looking at other things to do. I finally got back to dA recently, and discovered they opened a new upload/file storage thing called sta.sh. Interestingly enough,the announcement had a developers section, and as I thought, it’s got a public API.
Now, for my pictures, I tend to (well, as of this post, always) upload my pictures to dA. So a publish thing in Lightroom would be nifty, and might have some use for other people. Though I’m a bit iffy about usefulness, because you can also upload via FTP to sta.sh. Which would be a whole lot easier than custom plugins and the like, so I don’t think anything will come of it.
That said, resources I found:
www.deviantart.com/developers/stash – the Sta.sh API docs
www.deviantart.com/developers/oauth2 – dA’s OAuth2 API docs
www.adobe.com/devnet/photoshoplightroom.html – Lightroom SDK
github.com/ignacio/LuaOAuth – OAuth in Lua. Despite no mention of OAuth2, there’s a interestingly named ‘OAuth2.lua’ file.
regex.info/blog/lua/json – JSON in Lua
w3.impa.br/~diego/software/luasocket/ – LuaSocket – HTTP requests and whatnot
www.inf.puc-rio.br/~brunoos/luasec/reference.html – LuaSec – does https support
Though, the Lightroom API reference says “Sends or retrieves data using HTTP or HTTPS POST.”, so hopefully the above 2 files can be ignored.
In theory, that’s all that’s needed. Rip out the guts of one of the development plugins (most likely the FTP plugin), sprinkle the OAuth2 stuff here and there as necessary, with JSON for garnish, and it should work.
Emphasis on should.
Nothing ever works as expected.