takttusur / takt-media

Check our news and participate to competitions and other events
MIT License
0 stars 0 forks source link

Implement Events importer for VK #4

Closed RegiKein closed 5 months ago

RegiKein commented 1 year ago

Implement Events importer for VK

Acceptance criteria

  1. Implement VkRepostEventsAnalyzer 1.IsEvent - method which should check:
    1. if the post is reposted from another event - it should be identified like Event
    2. if the post is reposted from another group - it should be skipped
      1. Analyze has an argument VkPost
  2. Implement VkEventsImporter
    1. Import method returns PublicEvent object with fields:
      1. DateTime of start
      2. DateTime of end
      3. Title
      4. Attachments
      5. URL link to this event at vk.com
  3. Unit tests should be written

Technical details

classDiagram

class IVkApiClient{
    <<interface>>
    +GetGroupInfoAsync(groupId, cancellationToken) Task~VkGroupInfo~
    +GetPostsAsync(request, cancellationToken) Task~VkPost[]~
}
class VkApiClient
IVkApiClient <|.. VkApiClient

class PublicEvent
class IVkEventsImporter{
    <<interface>>
    +ImportAsync(vkGroupId, cancellationToken) Task~PublicEvent~
}

class VkRepostEventsAnalyzer{
    +AnalyzeAsync(VkPost) Task~VkPost~
}
class VkEventsImporter
class VkPost
VkEventsImporter ..> IVkApiClient
VkEventsImporter ..|> IVkEventsImporter
PublicEvent <.. IVkEventsImporter
VkRepostEventsAnalyzer ..> VkPost
IVkApiClient ..> VkPost

VK API