android-components / mozilla.components.service.pocket / PocketEndpoint


class PocketEndpoint (source)

Makes requests to the Pocket API and returns the requested data.

See Also



Name Summary
getGlobalVideoRecommendations fun getGlobalVideoRecommendations(): PocketResponse<List<PocketGlobalVideoRecommendation>>
Gets a response, filled with the Pocket global video recommendations from the Pocket API server on success. This network call is synchronous and the results are not cached. The API version of this call is available in the source code at PocketURLs.VALUE_VIDEO_RECS_VERSION.

Companion Object Functions

Name Summary
newInstance fun newInstance(client: Client, pocketApiKey: String, userAgent: String): PocketEndpoint
Returns a new instance of PocketEndpoint.

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.