If _FirstListsRefreshFlags AndAlso SettingDialog.UseAdditionalCount AndAlso Not SettingDialog.FirstCountApi = 0 Then
_FirstListsRefreshFlags = False
For Each tb As TabClass In _statuses.GetTabsByType(TabUsageType.Lists)
- If tb.ListInfo IsNot Nothing AndAlso tb.ListInfo.Id <> 0 Then ret = tw.GetListStatusAdditional(read, tb, False, SettingDialog.FirstCountApi)
+ If tb.ListInfo IsNot Nothing AndAlso tb.ListInfo.Id <> 0 Then ret = tw.GetListStatus(read, tb, False, SettingDialog.FirstCountApi)
Next
Else
For Each tb As TabClass In _statuses.GetTabsByType(TabUsageType.Lists)
If tb IsNot Nothing Then
If _UseAdditionalFlags AndAlso Not SettingDialog.MoreCountApi = 0 Then
_UseAdditionalFlags = False
- ret = tw.GetListStatusAdditional(read, tb, args.page = -1, SettingDialog.MoreCountApi)
+ ret = tw.GetListStatus(read, tb, args.page = -1, SettingDialog.MoreCountApi)
Else
ret = tw.GetListStatus(read, tb, args.page = -1)
End If
End If
End Function
- Public Function GetListStatus(ByVal read As Boolean, _
+ Public Overloads Function GetListStatus(ByVal read As Boolean, _
ByVal tab As TabClass, _
ByVal more As Boolean) As String
- If _endingFlag Then Return ""
-
- Dim res As HttpStatusCode
- Dim content As String = ""
- Dim page As Integer = 0
- Dim countQuery As Integer = 0
- Try
- If more Then
- res = twCon.GetListsStatuses(tab.ListInfo.UserId.ToString, tab.ListInfo.Id.ToString, _countApi, tab.OldestId, 0, content)
- Else
- res = twCon.GetListsStatuses(tab.ListInfo.UserId.ToString, tab.ListInfo.Id.ToString, _countApi, 0, 0, content)
- End If
- countQuery = _countApi
- Catch ex As Exception
- Return "Err:" + ex.Message
- End Try
- Select Case res
- Case HttpStatusCode.OK
- Twitter.AccountState = ACCOUNT_STATE.Valid
- Case HttpStatusCode.Unauthorized
- Twitter.AccountState = ACCOUNT_STATE.Invalid
- Return "Check your Username/Password."
- Case HttpStatusCode.BadRequest
- Return "Err:API Limits?"
- Case Else
- Return "Err:" + res.ToString() + "(" + GetCurrentMethod.Name + ")"
- End Select
-
- Return CreatePostsFromXml(content, WORKERTYPE.List, tab, read, countQuery, tab.OldestId)
+ Return GetListStatus(read, tab, more, -1)
End Function
- Public Function GetListStatusAdditional(ByVal read As Boolean, _
+ Public Overloads Function GetListStatus(ByVal read As Boolean, _
ByVal tab As TabClass, _
ByVal more As Boolean, _
- ByVal addcount As Integer) As String
+ ByVal count As Integer) As String
If _endingFlag Then Return ""
Dim page As Integer = 0
Dim countQuery As Integer = 0
Try
+ Dim cnt As Integer = 0
+ If count < 0 Then
+ cnt = _countApi
+ Else
+ cnt = count
+ End If
If more Then
- res = twCon.GetListsStatuses(tab.ListInfo.UserId.ToString, tab.ListInfo.Id.ToString, addcount, tab.OldestId, 0, content)
+ res = twCon.GetListsStatuses(tab.ListInfo.UserId.ToString, tab.ListInfo.Id.ToString, cnt, tab.OldestId, 0, content)
Else
- res = twCon.GetListsStatuses(tab.ListInfo.UserId.ToString, tab.ListInfo.Id.ToString, addcount, 0, 0, content)
+ res = twCon.GetListsStatuses(tab.ListInfo.UserId.ToString, tab.ListInfo.Id.ToString, cnt, 0, 0, content)
End If
- countQuery = addcount
+ countQuery = cnt
Catch ex As Exception
Return "Err:" + ex.Message
End Try
End Try
Next
- 'If _ApiMethod = MySocket.REQ_TYPE.ReqGetAPI Then _remainCountApi = sck.RemainCountApi
-
Return ""
End Function