Class: FetchService<S>
Type parameters
Name | Type |
---|---|
S | extends FetchState FetchState |
Hierarchy
↳
FetchService
Constructors
constructor
• new FetchService<S
>()
Type parameters
Name | Type |
---|---|
S | extends FetchState FetchState |
Inherited from
Properties
[combinedReducers]
• [combinedReducers]: (state
: any
, action
: any
) => any
Type declaration
▸ (state
, action
): any
Parameters
Name | Type |
---|---|
state | any |
action | any |
Returns
any
Inherited from
DefaultService.[combinedReducers]
Defined in
onekijs/packages/onekijs-framework/src/core/Service.ts:63
[dispatch]
• [dispatch]: any
Inherited from
Defined in
onekijs/packages/onekijs-framework/src/core/Service.ts:62
[inReducer]
• [inReducer]: boolean
Inherited from
Defined in
onekijs/packages/onekijs-framework/src/core/Service.ts:64
[reducers]
• [reducers]: any
Inherited from
Defined in
onekijs/packages/onekijs-framework/src/core/Service.ts:59
[sagas]
• [sagas]: any
Inherited from
Defined in
onekijs/packages/onekijs-framework/src/core/Service.ts:61
[types]
• [types]: any
Inherited from
Defined in
onekijs/packages/onekijs-framework/src/core/Service.ts:60
pullTask
• Optional
pullTask: Task
Defined in
onekijs/packages/onekijs-framework/src/core/FetchService.ts:10
state
• state: S
Inherited from
Defined in
onekijs/packages/onekijs-framework/src/core/Service.ts:66
Methods
[create]
▸ [create](initialState
): void
Parameters
Name | Type |
---|---|
initialState | S |
Returns
void
Inherited from
Defined in
onekijs/packages/onekijs-framework/src/core/Service.ts:69
[run]
▸ [run](): void
Returns
void
Inherited from
Defined in
onekijs/packages/onekijs-framework/src/core/Service.ts:208
[stop]
▸ [stop](): void
Returns
void
Inherited from
Defined in
onekijs/packages/onekijs-framework/src/core/Service.ts:226
cancelPull
▸ cancelPull(): Generator
<undefined
| void
, void
, unknown
>
Returns
Generator
<undefined
| void
, void
, unknown
>
Defined in
onekijs/packages/onekijs-framework/src/core/FetchService.ts:97
delayLoading
▸ delayLoading(delay_ms?
): Generator
<void
| CallEffect
<true
>, void
, unknown
>
Parameters
Name | Type |
---|---|
delay_ms? | number |
Returns
Generator
<void
| CallEffect
<true
>, void
, unknown
>
Defined in
onekijs/packages/onekijs-framework/src/core/FetchService.ts:13
delete
▸ delete<R
>(url
, options?
): Generator
<Generator
<void
| ForkEffect
<Generator
<void
| CallEffect
<true
>, void
, unknown
>> | Promise
<any
> | CancelEffect
| CallEffect
<unknown
>, void
, Task
& Response
>, void
, unknown
>
Type parameters
Name | Type |
---|---|
R | any |
Parameters
Name | Type |
---|---|
url | string |
options? | FetchOptions <R , never > |
Returns
Generator
<Generator
<void
| ForkEffect
<Generator
<void
| CallEffect
<true
>, void
, unknown
>> | Promise
<any
> | CancelEffect
| CallEffect
<unknown
>, void
, Task
& Response
>, void
, unknown
>
Defined in
onekijs/packages/onekijs-framework/src/core/FetchService.ts:23
fetch
▸ fetch<R
, T
>(url
, method
, body?
, options?
): Generator
<void
| ForkEffect
<Generator
<void
| CallEffect
<true
>, void
, unknown
>> | Promise
<any
> | CancelEffect
| CallEffect
<unknown
>, void
, Task
& Response
>
Type parameters
Name | Type |
---|---|
R | any |
T | any |
Parameters
Name | Type |
---|---|
url | string |
method | FetchMethod |
body? | T |
options | FetchOptions <R , T > |
Returns
Generator
<void
| ForkEffect
<Generator
<void
| CallEffect
<true
>, void
, unknown
>> | Promise
<any
> | CancelEffect
| CallEffect
<unknown
>, void
, Task
& Response
>
Defined in
onekijs/packages/onekijs-framework/src/core/FetchService.ts:44
fetchError
▸ fetchError(e
): void
Parameters
Name | Type |
---|---|
e | any |
Returns
void
Defined in
onekijs/packages/onekijs-framework/src/core/FetchService.ts:29
fetchSuccess
▸ fetchSuccess(result
): void
Parameters
Name | Type |
---|---|
result | any |
Returns
void
Defined in
onekijs/packages/onekijs-framework/src/core/FetchService.ts:36
get
▸ get<R
>(url
, options?
): any
Type parameters
Name | Type |
---|---|
R | any |
Parameters
Name | Type |
---|---|
url | string |
options? | FetchOptions <R , never > |
Returns
any
Defined in
onekijs/packages/onekijs-framework/src/core/FetchService.ts:75
patch
▸ patch<R
, T
>(url
, body
, options?
): Generator
<Generator
<void
| ForkEffect
<Generator
<void
| CallEffect
<true
>, void
, unknown
>> | Promise
<any
> | CancelEffect
| CallEffect
<unknown
>, void
, Task
& Response
>, void
, unknown
>
Type parameters
Name | Type |
---|---|
R | any |
T | any |
Parameters
Name | Type |
---|---|
url | string |
body | T |
options? | FetchOptions <R , T > |
Returns
Generator
<Generator
<void
| ForkEffect
<Generator
<void
| CallEffect
<true
>, void
, unknown
>> | Promise
<any
> | CancelEffect
| CallEffect
<unknown
>, void
, Task
& Response
>, void
, unknown
>
Defined in
onekijs/packages/onekijs-framework/src/core/FetchService.ts:103
poll
▸ poll(url
, fixedRateInMs
, options?
): any
Parameters
Name | Type |
---|---|
url | string |
fixedRateInMs | number |
options? | FetchOptions <any , never > |
Returns
any
Defined in
onekijs/packages/onekijs-framework/src/core/FetchService.ts:90
pollFetch
▸ pollFetch(url
, fixedRateInMs
, options?
): any
Parameters
Name | Type |
---|---|
url | string |
fixedRateInMs | number |
options? | FetchOptions <any , never > |
Returns
any
Defined in
onekijs/packages/onekijs-framework/src/core/FetchService.ts:80
post
▸ post<R
, T
>(url
, body
, options?
): Generator
<Generator
<void
| ForkEffect
<Generator
<void
| CallEffect
<true
>, void
, unknown
>> | Promise
<any
> | CancelEffect
| CallEffect
<unknown
>, void
, Task
& Response
>, void
, unknown
>
Type parameters
Name | Type |
---|---|
R | any |
T | any |
Parameters
Name | Type |
---|---|
url | string |
body | T |
options? | FetchOptions <R , T > |
Returns
Generator
<Generator
<void
| ForkEffect
<Generator
<void
| CallEffect
<true
>, void
, unknown
>> | Promise
<any
> | CancelEffect
| CallEffect
<unknown
>, void
, Task
& Response
>, void
, unknown
>
Defined in
onekijs/packages/onekijs-framework/src/core/FetchService.ts:109
put
▸ put<R
, T
>(url
, body
, options?
): Generator
<Generator
<void
| ForkEffect
<Generator
<void
| CallEffect
<true
>, void
, unknown
>> | Promise
<any
> | CancelEffect
| CallEffect
<unknown
>, void
, Task
& Response
>, void
, unknown
>
Type parameters
Name | Type |
---|---|
R | any |
T | any |
Parameters
Name | Type |
---|---|
url | string |
body | T |
options? | FetchOptions <R , T > |
Returns
Generator
<Generator
<void
| ForkEffect
<Generator
<void
| CallEffect
<true
>, void
, unknown
>> | Promise
<any
> | CancelEffect
| CallEffect
<unknown
>, void
, Task
& Response
>, void
, unknown
>
Defined in
onekijs/packages/onekijs-framework/src/core/FetchService.ts:115
setLoading
▸ setLoading(loading
, fetching
): void
Parameters
Name | Type |
---|---|
loading | boolean |
fetching | boolean |
Returns
void
Defined in
onekijs/packages/onekijs-framework/src/core/FetchService.ts:120