Interface: Application
Properties
networkRequest
• networkRequest: (input
: RequestInfo
| URL
, init?
: RequestInit
) => Promise
<Response
>
Type declaration
▸ (input
, init?
): Promise
<Response
>
Make a networkRequest from parent ReaderGata frame rather from plugin frame.
Parameters
Name | Type |
---|---|
input | RequestInfo | URL |
init? | RequestInit |
Returns
Promise
<Response
>
Methods
createNotification
▸ createNotification(notification
): Promise
<void
>
Show user a notification on the bottom left of the screen
Parameters
Name | Type |
---|---|
notification | NotificationMessage |
Returns
Promise
<void
>
getCorsProxy
▸ getCorsProxy(): Promise
<undefined
| string
>
Get cors proxy configured in settings.
Returns
Promise
<undefined
| string
>
getTheme
▸ getTheme(): Promise
<Theme
>
Returns the user's current theme
Returns
Promise
<Theme
>
isLoggedIn
▸ isLoggedIn(): Promise
<boolean
>
Returns true if thec user has been to logged in based in what is in authentication in the manifest
Returns
Promise
<boolean
>
isNetworkRequestCorsDisabled
▸ isNetworkRequestCorsDisabled(): Promise
<boolean
>
Used to determine whether requests from networkRequest are restricted by CORs.
Returns
Promise
<boolean
>
onChangeTheme
▸ onChangeTheme(theme
): Promise
<void
>
Callback method that is called after a users changes theme
Parameters
Name | Type |
---|---|
theme | Theme |
Returns
Promise
<void
>
onGetFeed
▸ Optional
onGetFeed(request
): Promise
<Feed
>
Callback method to retreive catalogs and lists of publications
Parameters
Name | Type |
---|---|
request | GetFeedRequest |
Returns
Promise
<Feed
>
onGetPublication
▸ Optional
onGetPublication(request
): Promise
<GetPublicationResponse
>
Callback method to get binary version of a publication rather than a url
Parameters
Name | Type |
---|---|
request | GetPublicationRequest |
Returns
Promise
<GetPublicationResponse
>
onPostLogin
▸ Optional
onPostLogin(): Promise
<void
>
Callback method that is called after the user has logged in
Returns
Promise
<void
>
onPostLogout
▸ Optional
onPostLogout(): Promise
<void
>
Callback method that is called after the user has logged out
Returns
Promise
<void
>
onSearch
▸ Optional
onSearch(request
): Promise
<Feed
>
Callback method to search for publications
Parameters
Name | Type |
---|---|
request | SearchRequest |
Returns
Promise
<Feed
>
onUiMessage
▸ Optional
onUiMessage(message
): Promise
<void
>
Callback method that recieves parent.postMessage requests from UI frames.
Parameters
Name | Type |
---|---|
message | any |
Returns
Promise
<void
>
postUiMessage
▸ postUiMessage(msg
): Promise
<void
>
Sends a message to ui frames like options
in manifest.json
.
Parameters
Name | Type |
---|---|
msg | any |
Returns
Promise
<void
>