1 | # apeman-service-spin@3.0.1
|
2 |
|
3 | Service for spin
|
4 |
|
5 | + Functions
|
6 | + [create(args)](#apeman-service-spin-function-create)
|
7 | + [ApSpinService](apeman-service-spin-classes) Class
|
8 | + [new ApSpinService(store, options)](#apeman-service-spin-classes-ap-spin-service-constructor)
|
9 | + [service.countSpin(spinName)](#apeman-service-spin-classes-ap-spin-service-countSpin)
|
10 | + [service.hasSpin(spinName)](#apeman-service-spin-classes-ap-spin-service-hasSpin)
|
11 | + [service.spinWhile(spinName, action)](#apeman-service-spin-classes-ap-spin-service-spinWhile)
|
12 | + [service.initSpin(spinName)](#apeman-service-spin-classes-ap-spin-service-initSpin)
|
13 | + [service.showSpin(spinName)](#apeman-service-spin-classes-ap-spin-service-showSpin)
|
14 | + [service.hideSpin(spinName)](#apeman-service-spin-classes-ap-spin-service-hideSpin)
|
15 |
|
16 | ## Functions
|
17 |
|
18 | <a class='md-heading-link' name="apeman-service-spin-function-create" ></a>
|
19 |
|
20 | ### create(args) -> `ApSpinService`
|
21 |
|
22 | Create the service instance
|
23 |
|
24 | | Param | Type | Description |
|
25 | | ----- | --- | -------- |
|
26 | | args | * | |
|
27 |
|
28 |
|
29 |
|
30 | <a class='md-heading-link' name="apeman-service-spin-classes"></a>
|
31 |
|
32 | ## ApSpinService Class
|
33 |
|
34 | Service to handle spin.
|
35 |
|
36 |
|
37 | <a class='md-heading-link' name="apeman-service-spin-classes-ap-spin-service-constructor" ></a>
|
38 |
|
39 | ### new ApSpinService(store, options)
|
40 |
|
41 | Constructor of ApSpinService class
|
42 |
|
43 | | Param | Type | Description |
|
44 | | ----- | --- | -------- |
|
45 | | store | Object | Redux store |
|
46 | | options | Object | Optional settings |
|
47 |
|
48 |
|
49 | <a class='md-heading-link' name="apeman-service-spin-classes-ap-spin-service-countSpin" ></a>
|
50 |
|
51 | ### service.countSpin(spinName) -> `number`
|
52 |
|
53 | Count active spins
|
54 |
|
55 | | Param | Type | Description |
|
56 | | ----- | --- | -------- |
|
57 | | spinName | string | Name of spin |
|
58 |
|
59 |
|
60 | <a class='md-heading-link' name="apeman-service-spin-classes-ap-spin-service-hasSpin" ></a>
|
61 |
|
62 | ### service.hasSpin(spinName) -> `boolean`
|
63 |
|
64 | Detect has a spin or not
|
65 |
|
66 | | Param | Type | Description |
|
67 | | ----- | --- | -------- |
|
68 | | spinName | string | Name of spin |
|
69 |
|
70 |
|
71 | <a class='md-heading-link' name="apeman-service-spin-classes-ap-spin-service-spinWhile" ></a>
|
72 |
|
73 | ### service.spinWhile(spinName, action) -> `Promise`
|
74 |
|
75 | Show spin while promise pending
|
76 |
|
77 | | Param | Type | Description |
|
78 | | ----- | --- | -------- |
|
79 | | spinName | string | Name of spin |
|
80 | | action | function | - |
|
81 |
|
82 |
|
83 | <a class='md-heading-link' name="apeman-service-spin-classes-ap-spin-service-initSpin" ></a>
|
84 |
|
85 | ### service.initSpin(spinName) -> `Promise`
|
86 |
|
87 | Init spin value
|
88 |
|
89 | | Param | Type | Description |
|
90 | | ----- | --- | -------- |
|
91 | | spinName | string | Name of spin. |
|
92 |
|
93 |
|
94 | <a class='md-heading-link' name="apeman-service-spin-classes-ap-spin-service-showSpin" ></a>
|
95 |
|
96 | ### service.showSpin(spinName) -> `Promise`
|
97 |
|
98 | Show a spin
|
99 |
|
100 | | Param | Type | Description |
|
101 | | ----- | --- | -------- |
|
102 | | spinName | string | Name of spin. |
|
103 |
|
104 |
|
105 | <a class='md-heading-link' name="apeman-service-spin-classes-ap-spin-service-hideSpin" ></a>
|
106 |
|
107 | ### service.hideSpin(spinName) -> `Promise`
|
108 |
|
109 | Hide a spin
|
110 |
|
111 | | Param | Type | Description |
|
112 | | ----- | --- | -------- |
|
113 | | spinName | string | Name of spin. |
|
114 |
|
115 |
|
116 |
|
117 |
|