This repository has been archived by the owner on Nov 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 473
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "For #12171 - Add a PocketStory supertype for all Pocket stori…
…es types" This reverts commit 10d0164.
- Loading branch information
Showing
16 changed files
with
92 additions
and
157 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
.../service/pocket/src/main/java/mozilla/components/service/pocket/PocketRecommendedStory.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
package mozilla.components.service.pocket | ||
|
||
/** | ||
* A Pocket recommended story. | ||
* | ||
* @property title the title of the story. | ||
* @property url a "pocket.co" shortlink for the original story's page. | ||
* @property imageUrl a url to a still image representing the story. | ||
* @property publisher optional publisher name/domain, e.g. "The New Yorker" / "nationalgeographic.co.uk"". | ||
* **May be empty**. | ||
* @property category topic of interest under which similar stories are grouped. | ||
* @property timeToRead inferred time needed to read the entire story. **May be -1**. | ||
*/ | ||
data class PocketRecommendedStory( | ||
val title: String, | ||
val url: String, | ||
val imageUrl: String, | ||
val publisher: String, | ||
val category: String, | ||
val timeToRead: Int, | ||
val timesShown: Long | ||
) |
35 changes: 35 additions & 0 deletions
35
...ts/service/pocket/src/main/java/mozilla/components/service/pocket/PocketSponsoredStory.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
package mozilla.components.service.pocket | ||
|
||
/** | ||
* A Pocket sponsored story. | ||
* | ||
* @property title the title of the story. | ||
* @property url 3rd party url containing the original story. | ||
* @property imageUrl a url to a still image representing the story. | ||
* Contains a "resize" parameter in the form of "resize=w618-h310" allowing to get the image | ||
* with a specific resolution and the CENTER_CROP ScaleType. | ||
* @property sponsor 3rd party sponsor of this story, e.g. "NextAdvisor". | ||
* @property shim Unique identifiers for when the user interacts with this story. | ||
*/ | ||
data class PocketSponsoredStory( | ||
val title: String, | ||
val url: String, | ||
val imageUrl: String, | ||
val sponsor: String, | ||
val shim: PocketSponsoredStoryShim, | ||
) | ||
|
||
/** | ||
* Sponsored story unique identifiers intended to be used in telemetry. | ||
* | ||
* @property click Unique identifier for when the sponsored story is clicked. | ||
* @property impression Unique identifier for when the user sees this sponsored story. | ||
*/ | ||
data class PocketSponsoredStoryShim( | ||
val click: String, | ||
val impression: String, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 0 additions & 71 deletions
71
components/service/pocket/src/main/java/mozilla/components/service/pocket/PocketStory.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...vice/pocket/src/test/java/mozilla/components/service/pocket/PocketRecommendedStoryTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
package mozilla.components.service.pocket | ||
|
||
import androidx.test.ext.junit.runners.AndroidJUnit4 | ||
import mozilla.components.service.pocket.helpers.assertClassVisibility | ||
import org.junit.Test | ||
import org.junit.runner.RunWith | ||
import kotlin.reflect.KVisibility | ||
|
||
@RunWith(AndroidJUnit4::class) | ||
class PocketRecommendedStoryTest { | ||
|
||
// This is the domain data type we expose to clients. Needs to be public. | ||
@Test | ||
fun `GIVEN a PocketRecommendedStory THEN its visibility is public`() { | ||
assertClassVisibility(PocketRecommendedStory::class, KVisibility.PUBLIC) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 0 additions & 69 deletions
69
components/service/pocket/src/test/java/mozilla/components/service/pocket/PocketStoryTest.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dd060c9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uh oh! Looks like an error! Details
Failed to fetch task artifact
public/github/customCheckRunText.md
for GitHub integration.Make sure the artifact exists on the worker or other location.