Skip to content

Commit

Permalink
Version Checking
Browse files Browse the repository at this point in the history
  • Loading branch information
Sharkgamedev committed Aug 16, 2021
1 parent 71cbf9a commit d332df2
Show file tree
Hide file tree
Showing 7 changed files with 84 additions and 0 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
29 changes: 29 additions & 0 deletions Scripts/Networking/Git.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Text;
using ABH.Net.Payloads;

namespace ABH.Net
{
class GitClient
{
public struct Repository
{
public string owner;
public string repo;
}

class Releases
{
static HttpClient _client = new HttpClient();

public List<string> ListReleases (Repository _repository)
{
Release _release = new Release(_repository, 30, 1);

HttpResponseMessage _response = await _client.PostAsJsonAsync
}
}
}
}
31 changes: 31 additions & 0 deletions Scripts/Networking/RESTPayloads.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Text;
using static ABH.Net.GitClient;

namespace ABH.Net.Payloads
{
// See https://docs.github.com/en/rest/reference/repos#releases
class Release
{
public string accept = "application/vnd.github.v3+json";
public Repository repo;
public int per_page;
public int page;

public Release(Repository _repo, int _per_page, int _page)
{
repo = _repo;
per_page = _per_page;
page = _page;
}

public Release(string _accept, Repository _repo, int _per_page, int _page)
{
accept = _accept;
repo = _repo;
per_page = _per_page;
page = _page;
}
}
}
24 changes: 24 additions & 0 deletions Scripts/Networking/VersionHandler.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace ABH.Net
{
class VersionHandler
{
public void GetLatestVersion()
{

}

public void ReadCurrentVersion()
{

}

public bool CheckCurrentVersion()
{
return false;
}
}
}
File renamed without changes.

0 comments on commit d332df2

Please sign in to comment.