Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update user agent version number to be consistent #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions 500pxAPI.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--[[ Some Handy Constants ]]--
local CONSUMER_KEY = "";
local CONSUMER_KEY = ""
local CONSUMER_SECRET = ""
local SALT = ""

Expand All @@ -18,6 +18,7 @@ local LrView = import "LrView"
local bind = LrView.bind

require "sha1"
require 'Info'

local JSON = require "JSON"
function JSON:onDecodeError( message, text, char )
Expand Down Expand Up @@ -135,9 +136,9 @@ local function call_it( method, url, params, rid )
end

if method == "POST" then
return LrHttp.post( url, query_string, { auth_header, { field = "Content-Type", value = "application/x-www-form-urlencoded" }, { field = "User-Agent", value = "500px Plugin 1.0" }, { field = "Cookie", value = "GARBAGE" } } )
return LrHttp.post( url, query_string, { auth_header, { field = "Content-Type", value = "application/x-www-form-urlencoded" }, { field = "User-Agent", value = "500px Plugin " .. displayVersion }, { field = "Cookie", value = "GARBAGE" } } )
else
return LrHttp.get( url .. "?" .. query_string, { auth_header, { field = "User-Agent", value = "500px Plugin 0.1.5" } } )
return LrHttp.get( url .. "?" .. query_string, { auth_header, { field = "User-Agent", value = "500px Plugin " .. displayVersion } } )
end
end

Expand Down
7 changes: 6 additions & 1 deletion Info.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
local majorVersion = 1
local minorVersion = 7
local revisionVersion = 1
displayVersion = majorVersion ..".".. minorVersion ..".".. revisionVersion

return {
LrSdkVersion = 4.0,
LrSdkMinimumVersion = 3.0,
Expand All @@ -12,6 +17,6 @@ return {
},
LrMetadataTagsetFactory = "500pxTagset.lua",
LrMetadataProvider = "500pxMetadataDefinition.lua",
VERSION = { major=1, minor=7, revision=1 },
VERSION = { major = majorVersion, minor = minorVersion, revision = revisionVersion },
URLHandler = "500pxURLHandler.lua",
}