Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Applications
android-components
Commits
59014bdf
Commit
59014bdf
authored
Jul 16, 2020
by
Tiger Oakes
Browse files
Fix Digital Asset Links API URL
parent
0e9cdef0
Changes
2
Hide whitespace changes
Inline
Side-by-side
components/service/digitalassetlinks/src/main/java/mozilla/components/service/digitalassetlinks/api/DigitalAssetLinksApi.kt
View file @
59014bdf
...
...
@@ -53,7 +53,7 @@ class DigitalAssetLinksApi(
}
private
fun
apiUrlBuilder
(
path
:
String
)
=
BASE_URL
.
toUri
().
buildUpon
()
.
p
ath
(
path
)
.
encodedP
ath
(
path
)
.
appendQueryParameter
(
"prettyPrint"
,
false
.
toString
())
.
appendQueryParameter
(
"key"
,
apiKey
)
...
...
components/service/digitalassetlinks/src/test/java/mozilla/components/service/digitalassetlinks/api/DigitalAssetLinksApiTest.kt
View file @
59014bdf
...
...
@@ -176,7 +176,7 @@ class DigitalAssetLinksApiTest {
fun
`passes
data
in
get
check
request
URL
for
android
target`
()
{
api
.
checkRelationship
(
webAsset
,
USE_AS_ORIGIN
,
androidAsset
)
verify
(
client
).
fetch
(
baseRequest
.
copy
(
url
=
"https://digitalassetlinks.googleapis.com/v1/assetlinks
%3A
check?"
+
url
=
"https://digitalassetlinks.googleapis.com/v1/assetlinks
:
check?"
+
"prettyPrint=false&key=X&relation=delegate_permission%2Fcommon.use_as_origin&"
+
"source.web.site=${Uri.encode("
https
:
//mozilla.org")}&" +
"target.androidApp.packageName=com.mozilla.fenix&"
+
...
...
@@ -188,7 +188,7 @@ class DigitalAssetLinksApiTest {
fun
`passes
data
in
get
check
request
URL
for
web
target`
()
{
api
.
checkRelationship
(
webAsset
,
HANDLE_ALL_URLS
,
webAsset
)
verify
(
client
).
fetch
(
baseRequest
.
copy
(
url
=
"https://digitalassetlinks.googleapis.com/v1/assetlinks
%3A
check?"
+
url
=
"https://digitalassetlinks.googleapis.com/v1/assetlinks
:
check?"
+
"prettyPrint=false&key=X&relation=delegate_permission%2Fcommon.handle_all_urls&"
+
"source.web.site=${Uri.encode("
https
:
//mozilla.org")}&" +
"target.web.site=${Uri.encode("
https
:
//mozilla.org")}"
...
...
@@ -199,7 +199,7 @@ class DigitalAssetLinksApiTest {
fun
`passes
data
in
get
list
request
URL`
()
{
api
.
listStatements
(
webAsset
)
verify
(
client
).
fetch
(
baseRequest
.
copy
(
url
=
"https://digitalassetlinks.googleapis.com/v1/statements
%3A
list?"
+
url
=
"https://digitalassetlinks.googleapis.com/v1/statements
:
list?"
+
"prettyPrint=false&key=X&source.web.site=${Uri.encode("
https
:
//mozilla.org")}"
))
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment