Skip to content

Commit

Permalink
feat: add builder method for optional user parameter for auth url (#32)
Browse files Browse the repository at this point in the history
* feat: add builder method for optional user parameter for auth url

* chore: bump version in gradle.properties

---------

Co-authored-by: Smartcar <[email protected]>
  • Loading branch information
allisonc07 and smartcar-ops authored Apr 2, 2024
1 parent 50384b1 commit 027ff2e
Show file tree
Hide file tree
Showing 23 changed files with 83 additions and 37 deletions.
2 changes: 1 addition & 1 deletion docs/allclasses-frame.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>All Classes (smartcar-auth - 3.2.0)</title>
<title>All Classes (smartcar-auth - 3.3.0)</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion docs/allclasses-noframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>All Classes (smartcar-auth - 3.2.0)</title>
<title>All Classes (smartcar-auth - 3.3.0)</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
Expand Down
31 changes: 28 additions & 3 deletions docs/com/smartcar/sdk/SmartcarAuth.AuthUrlBuilder.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>SmartcarAuth.AuthUrlBuilder (smartcar-auth - 3.2.0)</title>
<title>SmartcarAuth.AuthUrlBuilder (smartcar-auth - 3.3.0)</title>
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="SmartcarAuth.AuthUrlBuilder (smartcar-auth - 3.2.0)";
parent.document.title="SmartcarAuth.AuthUrlBuilder (smartcar-auth - 3.3.0)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10};
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
Expand Down Expand Up @@ -191,6 +191,13 @@ <h3>Method Summary</h3>
<div class="block">Set an optional state parameter.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code><a href="../../../com/smartcar/sdk/SmartcarAuth.AuthUrlBuilder.html" title="class in com.smartcar.sdk">SmartcarAuth.AuthUrlBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/smartcar/sdk/SmartcarAuth.AuthUrlBuilder.html#setUser-java.lang.String-">setUser</a></span>(java.lang.String&nbsp;user)</code>
<div class="block">Specify a unique identifier for the vehicle owner to track their progress through
Smartcar Connect.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
Expand Down Expand Up @@ -346,6 +353,24 @@ <h4>setFlags</h4>
</dl>
</li>
</ul>
<a name="setUser-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setUser</h4>
<pre>public&nbsp;<a href="../../../com/smartcar/sdk/SmartcarAuth.AuthUrlBuilder.html" title="class in com.smartcar.sdk">SmartcarAuth.AuthUrlBuilder</a>&nbsp;setUser(java.lang.String&nbsp;user)</pre>
<div class="block">Specify a unique identifier for the vehicle owner to track their progress through
Smartcar Connect.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>user</code> - An optional unique identifier for a vehicle owner. This identifier is used to aggregate
analytics across Connect sessions for each vehicle owner.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a reference to this object</dd>
</dl>
</li>
</ul>
<a name="build--">
<!-- -->
</a>
Expand Down
4 changes: 2 additions & 2 deletions docs/com/smartcar/sdk/SmartcarAuth.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>SmartcarAuth (smartcar-auth - 3.2.0)</title>
<title>SmartcarAuth (smartcar-auth - 3.3.0)</title>
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="SmartcarAuth (smartcar-auth - 3.2.0)";
parent.document.title="SmartcarAuth (smartcar-auth - 3.3.0)";
}
}
catch(err) {
Expand Down
4 changes: 2 additions & 2 deletions docs/com/smartcar/sdk/SmartcarCallback.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>SmartcarCallback (smartcar-auth - 3.2.0)</title>
<title>SmartcarCallback (smartcar-auth - 3.3.0)</title>
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="SmartcarCallback (smartcar-auth - 3.2.0)";
parent.document.title="SmartcarCallback (smartcar-auth - 3.3.0)";
}
}
catch(err) {
Expand Down
4 changes: 2 additions & 2 deletions docs/com/smartcar/sdk/SmartcarCodeReceiver.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>SmartcarCodeReceiver (smartcar-auth - 3.2.0)</title>
<title>SmartcarCodeReceiver (smartcar-auth - 3.3.0)</title>
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="SmartcarCodeReceiver (smartcar-auth - 3.2.0)";
parent.document.title="SmartcarCodeReceiver (smartcar-auth - 3.3.0)";
}
}
catch(err) {
Expand Down
4 changes: 2 additions & 2 deletions docs/com/smartcar/sdk/SmartcarResponse.Builder.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>SmartcarResponse.Builder (smartcar-auth - 3.2.0)</title>
<title>SmartcarResponse.Builder (smartcar-auth - 3.3.0)</title>
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="SmartcarResponse.Builder (smartcar-auth - 3.2.0)";
parent.document.title="SmartcarResponse.Builder (smartcar-auth - 3.3.0)";
}
}
catch(err) {
Expand Down
4 changes: 2 additions & 2 deletions docs/com/smartcar/sdk/SmartcarResponse.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>SmartcarResponse (smartcar-auth - 3.2.0)</title>
<title>SmartcarResponse (smartcar-auth - 3.3.0)</title>
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="SmartcarResponse (smartcar-auth - 3.2.0)";
parent.document.title="SmartcarResponse (smartcar-auth - 3.3.0)";
}
}
catch(err) {
Expand Down
4 changes: 2 additions & 2 deletions docs/com/smartcar/sdk/VehicleInfo.Builder.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>VehicleInfo.Builder (smartcar-auth - 3.2.0)</title>
<title>VehicleInfo.Builder (smartcar-auth - 3.3.0)</title>
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="VehicleInfo.Builder (smartcar-auth - 3.2.0)";
parent.document.title="VehicleInfo.Builder (smartcar-auth - 3.3.0)";
}
}
catch(err) {
Expand Down
4 changes: 2 additions & 2 deletions docs/com/smartcar/sdk/VehicleInfo.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>VehicleInfo (smartcar-auth - 3.2.0)</title>
<title>VehicleInfo (smartcar-auth - 3.3.0)</title>
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="VehicleInfo (smartcar-auth - 3.2.0)";
parent.document.title="VehicleInfo (smartcar-auth - 3.3.0)";
}
}
catch(err) {
Expand Down
2 changes: 1 addition & 1 deletion docs/com/smartcar/sdk/package-frame.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>com.smartcar.sdk (smartcar-auth - 3.2.0)</title>
<title>com.smartcar.sdk (smartcar-auth - 3.3.0)</title>
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
</head>
Expand Down
4 changes: 2 additions & 2 deletions docs/com/smartcar/sdk/package-summary.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>com.smartcar.sdk (smartcar-auth - 3.2.0)</title>
<title>com.smartcar.sdk (smartcar-auth - 3.3.0)</title>
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="com.smartcar.sdk (smartcar-auth - 3.2.0)";
parent.document.title="com.smartcar.sdk (smartcar-auth - 3.3.0)";
}
}
catch(err) {
Expand Down
4 changes: 2 additions & 2 deletions docs/com/smartcar/sdk/package-tree.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>com.smartcar.sdk Class Hierarchy (smartcar-auth - 3.2.0)</title>
<title>com.smartcar.sdk Class Hierarchy (smartcar-auth - 3.3.0)</title>
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="com.smartcar.sdk Class Hierarchy (smartcar-auth - 3.2.0)";
parent.document.title="com.smartcar.sdk Class Hierarchy (smartcar-auth - 3.3.0)";
}
}
catch(err) {
Expand Down
4 changes: 2 additions & 2 deletions docs/constant-values.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>Constant Field Values (smartcar-auth - 3.2.0)</title>
<title>Constant Field Values (smartcar-auth - 3.3.0)</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Constant Field Values (smartcar-auth - 3.2.0)";
parent.document.title="Constant Field Values (smartcar-auth - 3.3.0)";
}
}
catch(err) {
Expand Down
4 changes: 2 additions & 2 deletions docs/deprecated-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>Deprecated List (smartcar-auth - 3.2.0)</title>
<title>Deprecated List (smartcar-auth - 3.3.0)</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Deprecated List (smartcar-auth - 3.2.0)";
parent.document.title="Deprecated List (smartcar-auth - 3.3.0)";
}
}
catch(err) {
Expand Down
4 changes: 2 additions & 2 deletions docs/help-doc.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>API Help (smartcar-auth - 3.2.0)</title>
<title>API Help (smartcar-auth - 3.3.0)</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="API Help (smartcar-auth - 3.2.0)";
parent.document.title="API Help (smartcar-auth - 3.3.0)";
}
}
catch(err) {
Expand Down
9 changes: 7 additions & 2 deletions docs/index-all.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>Index (smartcar-auth - 3.2.0)</title>
<title>Index (smartcar-auth - 3.3.0)</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Index (smartcar-auth - 3.2.0)";
parent.document.title="Index (smartcar-auth - 3.3.0)";
}
}
catch(err) {
Expand Down Expand Up @@ -230,6 +230,11 @@ <h2 class="title">S</h2>
<dd>
<div class="block">Set an optional state parameter.</div>
</dd>
<dt><span class="memberNameLink"><a href="com/smartcar/sdk/SmartcarAuth.AuthUrlBuilder.html#setUser-java.lang.String-">setUser(String)</a></span> - Method in class com.smartcar.sdk.<a href="com/smartcar/sdk/SmartcarAuth.AuthUrlBuilder.html" title="class in com.smartcar.sdk">SmartcarAuth.AuthUrlBuilder</a></dt>
<dd>
<div class="block">Specify a unique identifier for the vehicle owner to track their progress through
Smartcar Connect.</div>
</dd>
<dt><a href="com/smartcar/sdk/SmartcarAuth.html" title="class in com.smartcar.sdk"><span class="typeNameLink">SmartcarAuth</span></a> - Class in <a href="com/smartcar/sdk/package-summary.html">com.smartcar.sdk</a></dt>
<dd>
<div class="block">Main class that provides SDK access methods.</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>smartcar-auth - 3.2.0</title>
<title>smartcar-auth - 3.3.0</title>
<script type="text/javascript">
tmpTargetPage = "" + window.location.search;
if (tmpTargetPage != "" && tmpTargetPage != "undefined")
Expand Down
4 changes: 2 additions & 2 deletions docs/overview-tree.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>Class Hierarchy (smartcar-auth - 3.2.0)</title>
<title>Class Hierarchy (smartcar-auth - 3.3.0)</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Class Hierarchy (smartcar-auth - 3.2.0)";
parent.document.title="Class Hierarchy (smartcar-auth - 3.3.0)";
}
}
catch(err) {
Expand Down
2 changes: 1 addition & 1 deletion smartcar-auth/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
libGroup=com.smartcar.sdk
libName=smartcar-auth
libVersion=3.2.0
libVersion=3.3.0
libDescription=Smartcar Android Auth SDK
Binary file modified smartcar-auth/jacoco.exec
Binary file not shown.
13 changes: 13 additions & 0 deletions smartcar-auth/src/main/java/com/smartcar/sdk/SmartcarAuth.java
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,19 @@ public AuthUrlBuilder setFlags(String[] flags) {
return this;
}

/**
* Specify a unique identifier for the vehicle owner to track their progress through
* Smartcar Connect.
*
* @param user An optional unique identifier for a vehicle owner. This identifier is used to aggregate
* analytics across Connect sessions for each vehicle owner.
* @return a reference to this object
*/
public AuthUrlBuilder setUser(String user) {
uriBuilder.appendQueryParameter("user", user);
return this;
}

/**
* Build a Smartcar Connect authorization url.
*
Expand Down
Loading

0 comments on commit 027ff2e

Please sign in to comment.