_remainCountApi)
End Function
- Public Function Search(ByVal words As String, ByVal lang As String, ByVal rpp As Integer, ByVal page As Integer, ByRef content As String) As HttpStatusCode
+ Public Function Search(ByVal words As String, ByVal lang As String, ByVal rpp As Integer, ByVal page As Integer, ByVal sinceId As Long, ByRef content As String) As HttpStatusCode
Dim param As New Dictionary(Of String, String)
If Not String.IsNullOrEmpty(words) Then param.Add("q", words)
If Not String.IsNullOrEmpty(lang) Then param.Add("lang", lang)
If rpp > 0 Then param.Add("rpp", rpp.ToString())
If page > 0 Then param.Add("page", page.ToString())
+ If sinceId > 0 Then param.Add("since_id", sinceId.ToString)
If param.Count = 0 Then Return HttpStatusCode.BadRequest
Private _posts As New Dictionary(Of Long, PostClass)
Private _sorter As New IdComparerClass
Private _oldestId As Long = Long.MaxValue '古いポスト取得用
+ Private _sinceId As Long = 0
#Region "検索"
'Search query
End Property
<Xml.Serialization.XmlIgnore()> _
+ Public Property SinceId() As Long
+ Get
+ Return _sinceId
+ End Get
+ Set(ByVal value As Long)
+ _sinceId = value
+ End Set
+ End Property
+
+ <Xml.Serialization.XmlIgnore()> _
Public Property Posts() As Dictionary(Of Long, PostClass)
Get
Return _posts
Dim res As HttpStatusCode
Dim content As String = ""
Dim page As Integer = 0
- If more Then page = tab.SearchPage
+ Dim sinceId As Long = 0
+ If more Then
+ page = tab.SearchPage
+ Else
+ sinceId = tab.SinceId
+ End If
+
Try
- res = twCon.Search(tab.SearchWords, tab.SearchLang, 40, page, content)
+ res = twCon.Search(tab.SearchWords, tab.SearchLang, 40, page, sinceId, content)
Catch ex As Exception
Return "Err:" + ex.Message
End Try
If post.IsMe AndAlso Not read AndAlso _readOwnPost Then post.IsRead = True
post.IsDm = False
post.RelTabName = tab.TabName
+ If Not more AndAlso post.Id > tab.SinceId Then tab.SinceId = post.Id
Catch ex As Exception
TraceOut(content)
Continue For