UpdateChannel.cs 897 B

1234567891011121314151617181920212223242526
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace PixiEditor.UpdateModule
  7. {
  8. public class UpdateChannel
  9. {
  10. public string Name { get; }
  11. public string RepositoryOwner { get; }
  12. public string RepositoryName { get; }
  13. public string ApiUrl { get; }
  14. public string IncompatibleFileApiUrl { get; }
  15. public UpdateChannel(string name, string repositoryOwner, string repositoryName)
  16. {
  17. Name = name;
  18. RepositoryOwner = repositoryOwner;
  19. RepositoryName = repositoryName;
  20. ApiUrl = $"https://api.github.com/repos/{repositoryOwner}/{repositoryName}/releases/latest";
  21. IncompatibleFileApiUrl = "https://raw.githubusercontent.com/" + $"{repositoryOwner}/{repositoryName}/" + "{0}/incompatible.json";
  22. }
  23. }
  24. }