Skip to content

Commit

Permalink
Merge pull request #92 from ThisIsBuddyRIch/get-last-event-method
Browse files Browse the repository at this point in the history
add get last event method
  • Loading branch information
ThisIsBuddyRIch committed Aug 16, 2019
2 parents 43e24d8 + 3b56182 commit c05d0b6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/DiadocApi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,14 @@ BoxEvent DiadocApi::GetEvent(const std::wstring& boxId, const std::wstring& even
return FromProtoBytes<BoxEvent>(PerformHttpRequest(buf.str(), GET));
}

Diadoc::Api::Proto::Events::BoxEvent DiadocApi::GetLastEvent(const std::wstring& boxId)
{
WppTraceDebugOut("GetLastEvent...");
std::wstringstream buf;
buf << L"/GetLastEvent?boxId=" << StringHelper::CanonicalizeUrl(boxId);
return FromProtoBytes<Diadoc::Api::Proto::Events::BoxEvent>(PerformHttpRequest(buf.str(), GET));
}

Message DiadocApi::PostDiadocMessage(const MessageToPost& msg, const std::wstring& operationId)
{
WppTraceDebugOut(L"PostDiadocMessage...");
Expand Down
2 changes: 2 additions & 0 deletions src/DiadocApi.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ class DiadocApi
std::wstring Recognize(const std::wstring& fileName, const Bytes_t& fileContent);
Diadoc::Api::Proto::Recognition::Recognized GetRecognized(const std::wstring& recognitionId);

Diadoc::Api::Proto::Events::BoxEvent GetLastEvent(const std::wstring& boxId);

Diadoc::Api::Proto::CustomPrintFormDetectionResult DetectCustomPrintForms(const std::wstring& boxId, const Diadoc::Api::Proto::CustomPrintFormDetectionRequest request);

class PrintFormResult
Expand Down

0 comments on commit c05d0b6

Please sign in to comment.