The IO logic.
- Source:
Methods
(static) GetTweet(num, callback) → {undefined}
Gets a specific tweet for annotation by number.
Parameters:
| Name | Type | Description |
|---|---|---|
num |
number | tweet number |
callback |
ioCallback | callback function |
- Source:
Returns:
- Type
- undefined
(static) NextTweet(callback) → {undefined}
Requests next tweet.
Parameters:
| Name | Type | Description |
|---|---|---|
callback |
ioCallback | callback function |
- Source:
Returns:
- Type
- undefined
(static) Pause(callback) → {undefined}
Send pause to server.
Parameters:
| Name | Type | Description |
|---|---|---|
callback |
ioCallback | callback function |
- Source:
Returns:
- Type
- undefined
(static) PreviousTweet(callback) → {undefined}
Requests previous tweet.
Parameters:
| Name | Type | Description |
|---|---|---|
callback |
ioCallback | callback function |
- Source:
Returns:
- Type
- undefined
(static) Resume(callback) → {undefined}
Send resume to server.
Parameters:
| Name | Type | Description |
|---|---|---|
callback |
ioCallback | callback function |
- Source:
Returns:
- Type
- undefined
(static) SendAnnotation(annotation, callback) → {undefined}
Send annotation of tweet to server.
Parameters:
| Name | Type | Description |
|---|---|---|
annotation |
string | chosen text |
callback |
ioCallback | callback function |
- Source:
Returns:
- Type
- undefined
(private, inner) FakeGetTweet(num, callback) → {undefined}
Gets n-th tweet of fakeTweets.
Parameters:
| Name | Type | Description |
|---|---|---|
num |
number | number of tweet |
callback |
ioCallback | callback function |
- Source:
Returns:
- Type
- undefined
(private, inner) FakeNextTweet(callback) → {undefined}
Increments current tweet number and sends the current tweet.
Parameters:
| Name | Type | Description |
|---|---|---|
callback |
ioCallback | callback function |
- Source:
Returns:
- Type
- undefined
(private, inner) FakePause(callback) → {undefined}
Sends "fakeSuccessStatus" after s time delay.
Parameters:
| Name | Type | Description |
|---|---|---|
callback |
ioCallback | callback function |
- Source:
Returns:
- Type
- undefined
(private, inner) FakePreviousTweet(callback) → {undefined}
Decrements current tweet number and sends the current tweet.
Parameters:
| Name | Type | Description |
|---|---|---|
callback |
ioCallback | callback function |
- Source:
Returns:
- Type
- undefined
(private, inner) FakeResume(callback) → {undefined}
Just sends the current tweet.
Parameters:
| Name | Type | Description |
|---|---|---|
callback |
ioCallback | callback function |
- Source:
Returns:
- Type
- undefined
(private, inner) FakeSendAnnotation(annotation, callback) → {undefined}
Sets annotation of current tweet and calls next tweet function.
Parameters:
| Name | Type | Description |
|---|---|---|
annotation |
string | chosen text |
callback |
ioCallback | callback function |
- Source:
Returns:
- Type
- undefined
(private, inner) FakeSendTweet(callback) → {undefined}
Sends current tweet with chosen annotation after a time delay. Also:
- success - success of call
- hasNext - there is a next tweet for annotation
- hasPrevious - there is a previous tweet for annotation
- countTweets - how many tweet exists for annotation
- currentTweetNum - the id of current tweet
- countAnnotatedTweets - how many are already annotated
Parameters:
| Name | Type | Description |
|---|---|---|
callback |
ioCallback | callback function |
- Source:
Returns:
- Type
- undefined