Skip to content

Commit

Permalink
Roku 1.1.0 Release (#2)
Browse files Browse the repository at this point in the history
Roku 1.1.0 Release
  • Loading branch information
jsalaber authored Feb 18, 2019
1 parent ef1738c commit cadf8d5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 deletions.
3 changes: 1 addition & 2 deletions source/components/framework/taplytics/TaplyticsAPI.brs
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ function getValueForVariable(params as Object) as Object
if m.top.enablePrint then print "Variable name --> ",params.name
if m.top.enablePrint then print "Default value --> ",params.default

value = "NOTREADY"
value = params.default
if m._clientConfigReady
value = params.default
if m._clientConfig.DoesExist(params.name) then value = m._clientConfig[params.name]
end if
return value
Expand Down
30 changes: 18 additions & 12 deletions source/components/framework/taplytics/TaplyticsPrivateAPI.brs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function init()
m.TAP_SDK_VERSION = "1.0.1"
m.TAP_SDK_VERSION = "1.1.0"
m.top.id = "tap"

m.messagePort = _createPort()
Expand Down Expand Up @@ -126,7 +126,7 @@ end function
function Taplytics() as Object
prototype = {}

prototype.TAP_SDK_VERSION = "1.0.1"
prototype.TAP_SDK_VERSION = "1.1.0"
prototype.PLAYER_SOFTWARE_NAME = "RokuSG"
prototype.TAP_API_VERSION = "2.0"
prototype.PLAYER_IS_FULLSCREEN = "true"
Expand Down Expand Up @@ -194,7 +194,7 @@ function Taplytics() as Object

prototype.logEvent = function(data as Object)
if m._top.enablePrint then print "ENTER logEvent>>>"
m._postClientEvents(data)
m._postClientEvents("goalAchieved", data)
end function

prototype.resetAppUser = function()
Expand Down Expand Up @@ -384,18 +384,18 @@ function Taplytics() as Object

end function

prototype._postClientEvents = function(queryParameters as Object)
prototype._postClientEvents = function(eventType as Object, queryParameters as Object)

' t - Taplytics API Key ● API Key
' sid - Session_id
' e - Array of events
' type - type of the event (String)
' gn - goal name (String)
' date - current date (Date)
' val - numerical value (Double)
' data - metaData (JSON Object)
' prod - is prod, not live update (Boolean)
' sid - session_id (String)
' type - type of the event (String)
' gn - goal name (String)
' date - current date (Date)
' val - numerical value (Double)
' data - metaData (JSON Object)
' prod - is prod, not live update (Boolean)
' sid - session_id (String)

requiredParamaters = {}

Expand All @@ -407,7 +407,10 @@ function Taplytics() as Object

'create event
event = {}
event.type = "goalAchieved"

event.type = eventType
print "event type: ", event.type

if queryParameters.DoesExist("eventName") and queryParameters.eventName <> ""
event.gn = queryParameters.eventName
end if
Expand Down Expand Up @@ -488,6 +491,9 @@ function Taplytics() as Object
m._top.clientConfig = m._variables
if m._top.enablePrint then print m._variables
m._clientConfigReady = true

m._postClientEvents("appActive", {})

end if
end function

Expand Down

0 comments on commit cadf8d5

Please sign in to comment.