![]() |
TSDuck v3.46-4930
MPEG Transport Stream Toolkit
|
#include <tsGitHubRelease.h>
Classes | |
| struct | Asset |
Public Types | |
| using | AssetList = std::list<Asset> |
Public Member Functions | |
| GitHubRelease ()=default | |
| GitHubRelease (const UString &owner, const UString &repository, const UString &tag=UString(), Report &report=(ts::CerrReport::Instance())) | |
| int | assetDownloadCount () const |
| bool | downloadInfo (const UString &owner, const UString &repository, const UString &tag=UString(), Report &report=(ts::CerrReport::Instance())) |
| void | getAssets (AssetList &assets) const |
| void | getPlatformAssets (AssetList &assets) const |
| bool | isValid () const |
| Time | publishDate () const |
| UString | sourceFileName () const |
| UString | sourceTarURL () const |
| UString | sourceURL () const |
| UString | sourceZipURL () const |
| UString | tag () const |
| UString | version () const |
| UString | versionName () const |
Static Public Member Functions | |
| static bool | GetAllVersions (GitHubReleaseVector &versions, const UString &owner, const UString &repository, Report &report=(ts::CerrReport::Instance())) |
| static bool | IsPlatformAsset (const UString &fileName) |
This class holds information from GitHub about a release of a project.
| using ts::GitHubRelease::AssetList = std::list<Asset> |
List of assets.
|
default |
Default constructor.
| ts::GitHubRelease::GitHubRelease | ( | const UString & | owner, |
| const UString & | repository, | ||
| const UString & | tag = UString(), | ||
| Report & | report = (ts::CerrReport::Instance()) ) |
Constructor with download of the version information from GitHub. Use isValid() to check if the download was successful.
| [in] | owner | Project owner, either a GitHub user name or organization name. |
| [in] | repository | Project repository name. |
| [in] | tag | Git tag of the version to fetch. If empty, fetch the latest version. |
| [in,out] | report | Where to report error. |
|
inline |
Check if the content of this object is a valid release description.
| bool ts::GitHubRelease::downloadInfo | ( | const UString & | owner, |
| const UString & | repository, | ||
| const UString & | tag = UString(), | ||
| Report & | report = (ts::CerrReport::Instance()) ) |
Download the version information from GitHub.
| [in] | owner | Project owner, either a GitHub user name or organization name. |
| [in] | repository | Project repository name. |
| [in] | tag | Git tag of the version to fetch. If empty, fetch the latest version. |
| [in,out] | report | Where to report error. |
| UString ts::GitHubRelease::tag | ( | ) | const |
Get the Git tag name of the release.
| UString ts::GitHubRelease::version | ( | ) | const |
Get the version of the release.
| UString ts::GitHubRelease::versionName | ( | ) | const |
Get the version name of the release.
| Time ts::GitHubRelease::publishDate | ( | ) | const |
Get the publish date of the release.
| UString ts::GitHubRelease::sourceTarURL | ( | ) | const |
| UString ts::GitHubRelease::sourceZipURL | ( | ) | const |
| UString ts::GitHubRelease::sourceURL | ( | ) | const |
| UString ts::GitHubRelease::sourceFileName | ( | ) | const |
Get an appropriate file name to download sourceURL().
| int ts::GitHubRelease::assetDownloadCount | ( | ) | const |
Get the number of downloads for the assets of the release.
| void ts::GitHubRelease::getAssets | ( | AssetList & | assets | ) | const |
Get the list of all assets for the release.
| [out] | assets | The returned list of assets. |
| void ts::GitHubRelease::getPlatformAssets | ( | AssetList & | assets | ) | const |
Get the list of assets for the current platform.
| [out] | assets | The returned list of assets. |
|
static |
Check if a binary file is appropriate for the current platform. The check is based on various naming conventions.
| [in] | fileName | Asset base file name (no directory). |
|
static |
Download information from GitHub for all versions of a product.
| [out] | versions | Returned vector of downloaded versions. |
| [in] | owner | Project owner, either a GitHub user name or organization name. |
| [in] | repository | Project repository name. |
| [in,out] | report | Where to report error. |