Skip to content

Commit

Permalink
2.12.1345
Browse files Browse the repository at this point in the history
New Features:

* This release adds mod creation and modfile upload support.
** Mod Uploads are managed through the same system as downloads
** Mod Management needs to be enabled for both mod upload and download
functionality.
** Call `GetModCreationHandle` to get a handle for your mod upload.
** Call `SubmitNewModAsync` to create a new mod on the server. You should
keep using the same handle for repeated calls to this function if the
first one returns an error, such as a data validation error.
** Once `SubmitNewModAsync` returns successfully, you can discard the Mod
Creation Handle and request a new one for subsequent mod submissions.
** Once you have a mod ID for your new mod, call SubmitNewModfileForMod
to enqueue a modfile upload.
** Modfile uploads are processed in the queue ahead of downloads
** `QueryCurrentModUpdate` will give progress info for the current upload
or download
** ModManagementEvents will be emitted for uploads as well as downloads,
including an upload completion event

* FModioFilterParams objects now support string filtering on metadata blobs.
  Use `MetadataLike` to specify a filter string

* GeneratedHeader/GeneratedSource folders will not automatically be
  rebuilt in standalone release archives, this avoids issues with P4
marking those folders as read-only

Bug Fixes:

* SubmitModRatingAsync now correctly sets the GameID and ModID
  parameters on the relevant HTTP request
  • Loading branch information
stephenwhittle committed Nov 11, 2021
1 parent f7c1674 commit 7305608
Show file tree
Hide file tree
Showing 37 changed files with 1,405 additions and 319 deletions.
453 changes: 368 additions & 85 deletions Doc/documentation.html

Large diffs are not rendered by default.

Binary file added Doc/img/nd_img_K2_GetModCreationHandle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Doc/img/nd_img_K2_SubmitNewModAsync.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Doc/img/nd_img_K2_SubmitNewModFileForMod.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 13 additions & 13 deletions Source/Modio/GeneratedSource/ArchiveFileImplementation.cpp
Original file line number Diff line number Diff line change
@@ -1,31 +1,32 @@
/*
/*
* Copyright (C) 2021 mod.io Pty Ltd. <https://mod.io>
*
*
* This file is part of the mod.io SDK.
*
* Distributed under the MIT License. (See accompanying file LICENSE or
*
* Distributed under the MIT License. (See accompanying file LICENSE or
* view online at <https://github.com/modio/modio-sdk/blob/main/LICENSE>)
*
*
*/

#ifdef MODIO_SEPARATE_COMPILATION
#include "modio/detail/compression/zip/ArchiveFileImplementation.h"
#include "modio/detail/compression/zip/ArchiveFileImplementation.h"
#endif

namespace Modio
{
namespace Detail
{

void ArchiveFileImplementation::AddEntry(ArchiveEntry Entry)
void ArchiveFileImplementation::AddEntry(ArchiveEntry Entry)
{
ArchiveEntries.push_back(Entry);
}

void ArchiveFileImplementation::AddEntry(std::string FileName, std::uintmax_t FileOffset,
std::uintmax_t CompressedSize, CompressionMethod Compression)
void ArchiveFileImplementation::AddEntry(std::string FileName, std::uintmax_t FileOffset,
std::uintmax_t CompressedSize, std::uintmax_t UncompressedSize,
CompressionMethod Compression, std::uint32_t CRCValue, bool bIsDirectory)
{
ArchiveEntries.push_back(ArchiveEntry {Compression, FileName, FileOffset, CompressedSize});
ArchiveEntries.push_back(
ArchiveEntry {Compression, FileName, FileOffset, CompressedSize, UncompressedSize, CRCValue, bIsDirectory});
}

std::uintmax_t ArchiveFileImplementation::GetNumberOfEntries()
Expand All @@ -44,5 +45,4 @@ void ArchiveFileImplementation::AddEntry(std::string FileName, std::uintmax_t Fi
}

} // namespace Detail
}

} // namespace Modio
31 changes: 20 additions & 11 deletions Source/Modio/GeneratedSource/ModioFilterParams.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
/*
* Copyright (C) 2021 mod.io Pty Ltd. <https://mod.io>
*
*
* This file is part of the mod.io SDK.
*
* Distributed under the MIT License. (See accompanying file LICENSE or
*
* Distributed under the MIT License. (See accompanying file LICENSE or
* view online at <https://github.com/modio/modio-sdk/blob/main/LICENSE>)
*
*
*/

#ifdef MODIO_SEPARATE_COMPILATION
Expand Down Expand Up @@ -72,8 +72,7 @@ namespace Modio

Modio::FilterParams& FilterParams::WithTags(std::vector<std::string> NewTags)
{
Tags.clear();
Tags.insert(Tags.end(), NewTags.begin(), NewTags.end());
Tags = std::move(NewTags);
return *this;
}

Expand All @@ -86,8 +85,7 @@ namespace Modio

Modio::FilterParams& FilterParams::WithoutTags(std::vector<std::string> NewTags)
{
ExcludedTags.clear();
ExcludedTags.insert(Tags.end(), NewTags.begin(), NewTags.end());
ExcludedTags = std::move(NewTags);
return *this;
}

Expand All @@ -98,6 +96,12 @@ namespace Modio
return *this;
}

Modio::FilterParams& Modio::FilterParams::MetadataLike(std::string SearchString)
{
MetadataBlobSearchString = SearchString;
return *this;
}

Modio::FilterParams& FilterParams::IndexedResults(std::size_t StartIndex, std::size_t ResultCount)
{
IsPaged = false;
Expand Down Expand Up @@ -192,7 +196,7 @@ namespace Modio
std::string TagStr;
for (std::string Tag : Tags)
{
TagStr += Tag + " ";
TagStr += Tag + ",";
}
TagStr.resize(TagStr.size() - 1);
FilterFields.push_back(fmt::format("tags={}", TagStr));
Expand All @@ -203,12 +207,17 @@ namespace Modio
std::string ExcludedTagStr;
for (std::string Tag : ExcludedTags)
{
ExcludedTagStr += Tag + " ";
ExcludedTagStr += Tag + ",";
}
ExcludedTagStr.resize(ExcludedTagStr.size() - 1);
FilterFields.push_back(fmt::format("tags-not-in={}", ExcludedTagStr));
}

if (MetadataBlobSearchString)
{
FilterFields.push_back(fmt::format("metadata_blob-lk=*{}*", *MetadataBlobSearchString));
}

std::string ResultLimitStr;
if (IsPaged)
{
Expand Down
Loading

0 comments on commit 7305608

Please sign in to comment.