mozilla-mobile / firefox-echo-show

Firefox for Amazon's Echo Show
Mozilla Public License 2.0
25 stars 12 forks source link

[238] Move PocketEndpoint to android-components #258

Closed mcomella closed 5 years ago

mcomella commented 5 years ago

Why/User Benefit/User Problem

The request code between Pocket video recommendations and Pocket Listen recommendations is largely the same so we should share them. The video recommendations code currently exists on FFTV: we should move it to components and adapt it to Pocket Listen so we can share code and minimize our workload.

All work is done in android-components so this bug is filed only to track https://github.com/mozilla-mobile/android-components/issues/651

What / Requirements

Acceptance Criteria (how do I know when I’m done?)

mcomella commented 5 years ago

Status update: adding this to android components is harder than anticipated because the code uses a lot of methods internal to FFTV and we're not using the APIs components recommends (e.g. OkHttp instead of :concept-fetch).

I've submitted a PR to land PocketEndpointRaw and I hope to finish it all up tomorrow.

mcomella commented 5 years ago

Status update: submitted PR for PocketJSONParser. Still need to:

mcomella commented 5 years ago

@athomasmoz A unexpected turn of events: I realized the existing Pocket APIs do not explain how to access the Listen functionality. I contacted the Pocket team to see if they have information about this or if I should be talking to the Pocket Alexa skill folks. If we need to hit another endpoint to get the Listen data, there may be more to do here than I was initially expecting.

mcomella commented 5 years ago

Status update: submitted PR for PocketEndpoint. This should make it easy to add our code to access the Pocket API for the articles we need. As per my message above, we may need to access another server to get the audio data. I can use what I learned creating PocketEndpoint to make this a pretty fast change however.

Once we have the designs, we can also add the application logic (i.e. I implemented how we fetch but not the logic for when we should fetch), which can potentially be shared between FFTV and FFES.

mcomella commented 5 years ago

Waiting for review on PocketEndpoint. I'm going to create another bug to manage the Pocket Listen data.

mcomella commented 5 years ago

Created #270 for the Pocket Listen data.

mcomella commented 5 years ago

The components review is complete, the PR is merged, and the downstream issue is closed: closing this.