ArchiSteamFarm/IPC/Controllers/Api/GitHubController.cs
/// <summary>
///     Fetches history of specific GitHub page from ASF project.
/// </summary>
/// <remarks>
///     This is internal API being utilizied by our ASF-ui IPC frontend. You should not depend on existence of any /Api/WWW endpoints as they can disappear and change anytime.
/// </remarks>
Fetches history of specific GitHub page from ASF project.
Fetches history of specific GitHub page from ASF project .
[HttpGet("Wiki/History/{page:required}")]
	[ProducesResponseType(typeof(GenericResponse<string>), (int) HttpStatusCode.OK)]
	[ProducesResponseType(typeof(GenericResponse), (int) HttpStatusCode.BadRequest)]
	[ProducesResponseType(typeof(GenericResponse), (int) HttpStatusCode.ServiceUnavailable)]
	public async Task<ActionResult<GenericResponse>> GitHubWikiHistoryGet(string page) {
		if (string.IsNullOrEmpty(page)) {
			throw new ArgumentNullException(nameof(page));
		}
		Dictionary<string, DateTime>? revisions = await GitHub.GetWikiHistory(page).ConfigureAwait(false);
		return revisions != null ? revisions.Count > 0 ? Ok(new GenericResponse<ImmutableDictionary<string, DateTime>>(revisions.ToImmutableDictionary())) : BadRequest(new GenericResponse(false, string.Format(CultureInfo.CurrentCulture, Strings.ErrorIsInvalid, nameof(page)))) : StatusCode((int) HttpStatusCode.ServiceUnavailable, new GenericResponse(false, string.Format(CultureInfo.CurrentCulture, Strings.ErrorRequestFailedTooManyTimes, WebBrowser.MaxTries)));
	}
[ HttpGet ( " " ) ] [ ProducesResponseType ( typeof ( GenericResponse < string > ) , ( int ) HttpStatusCode . OK ) ] [ ProducesResponseType ( typeof ( GenericResponse ) , ( int ) HttpStatusCode . BadRequest ) ] [ ProducesResponseType ( typeof ( GenericResponse ) , ( int ) HttpStatusCode . ServiceUnavailable ) ] public async Task < ActionResult < GenericResponse > > GitHubWikiHistoryGet ( string page ) { if ( string . IsNullOrEmpty ( page ) ) { throw new ArgumentNullException ( nameof ( page ) ) ; } Dictionary < string , DateTime > ? revisions = await GitHub . GetWikiHistory ( page ) . ConfigureAwait ( false ) ; return revisions != null ? revisions . Count > 0 ? Ok ( new GenericResponse < ImmutableDictionary < string , DateTime > > ( revisions . ToImmutableDictionary ( ) ) ) : BadRequest ( new GenericResponse ( false , string . Format ( CultureInfo . CurrentCulture , Strings . ErrorIsInvalid , nameof ( page ) ) ) ) : StatusCode ( ( int ) HttpStatusCode . ServiceUnavailable , new GenericResponse ( false , string . Format ( CultureInfo . CurrentCulture , Strings . ErrorRequestFailedTooManyTimes , WebBrowser . MaxTries ) ) ) ; }
Fetches history of specific GitHub page from ASF project.
Fetches history of specific GitHub page from ASF project .
page
string
remarks
This is internal API being utilizied by our ASF-ui IPC frontend. You should not depend on existence of any /Api/WWW endpoints as they can disappear and change anytime.
This is internal API being utilizied by our ASF - ui IPC frontend . You should not depend on existence of any / Api / WWW endpoints as they can disappear and change anytime .