mirror of
https://github.com/iminet/dev.git
synced 2026-10-15 01:24:54 +02:00
Added ImgBB Test & Github Test applications with using environment variables
This commit is contained in:
+3
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"dotnet.defaultSolution": "GithubTest.sln"
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Iminetcore" Version="26.8.2419.568" />
|
||||||
|
<PackageReference Include="Octokit" Version="14.0.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using Octokit;
|
||||||
|
|
||||||
|
namespace Iminetsoft.Dev.GithubTest
|
||||||
|
{
|
||||||
|
public static class Program
|
||||||
|
{
|
||||||
|
public static async Task Main(string[] Args)
|
||||||
|
{
|
||||||
|
var args = Iminetcore.ConsoleParser.ArgParser.ParseDynamic(Args);
|
||||||
|
|
||||||
|
var github = new GitHubClient(new ProductHeaderValue("GithubTest"));
|
||||||
|
github.Credentials = new Credentials(Environment.GetEnvironmentVariable("GITHUB_TOKEN"));
|
||||||
|
|
||||||
|
var repos = await github.Repository.GetAllForCurrent();
|
||||||
|
|
||||||
|
repos.ToList().ForEach(r => Console.WriteLine($"{r.Name}"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
using System.Collections;
|
||||||
|
|
||||||
namespace Iminetsoft.Dev.ImgBBTest
|
namespace Iminetsoft.Dev.ImgBBTest
|
||||||
{
|
{
|
||||||
public static class Program
|
public static class Program
|
||||||
@@ -8,6 +10,10 @@ namespace Iminetsoft.Dev.ImgBBTest
|
|||||||
|
|
||||||
Console.WriteLine("IMGBB Test Application");
|
Console.WriteLine("IMGBB Test Application");
|
||||||
|
|
||||||
|
Environment.GetEnvironmentVariables().Cast<DictionaryEntry>().OrderBy(x => x.Key).ToList().ForEach(x => Console.WriteLine($"\t{x.Key} :: {x.Value}"));
|
||||||
|
|
||||||
|
return;
|
||||||
|
|
||||||
var imgbb_token = Environment.GetEnvironmentVariable("IMGBB_TOKEN") ?? args.token ?? args.t;
|
var imgbb_token = Environment.GetEnvironmentVariable("IMGBB_TOKEN") ?? args.token ?? args.t;
|
||||||
var imgbb = new ImgBBApi(imgbb_token);
|
var imgbb = new ImgBBApi(imgbb_token);
|
||||||
var uploaded = new List<string>();
|
var uploaded = new List<string>();
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio Version 17
|
# Visual Studio Version 17
|
||||||
VisualStudioVersion = 17.5.2.0
|
VisualStudioVersion = 17.5.2.0
|
||||||
@@ -9,13 +10,25 @@ EndProject
|
|||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Debug|x64 = Debug|x64
|
||||||
|
Debug|x86 = Debug|x86
|
||||||
Release|Any CPU = Release|Any CPU
|
Release|Any CPU = Release|Any CPU
|
||||||
|
Release|x64 = Release|x64
|
||||||
|
Release|x86 = Release|x86
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{693F60C6-0416-B5CF-C5C9-43E9DA499BAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{693F60C6-0416-B5CF-C5C9-43E9DA499BAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{693F60C6-0416-B5CF-C5C9-43E9DA499BAF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{693F60C6-0416-B5CF-C5C9-43E9DA499BAF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{693F60C6-0416-B5CF-C5C9-43E9DA499BAF}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{693F60C6-0416-B5CF-C5C9-43E9DA499BAF}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{693F60C6-0416-B5CF-C5C9-43E9DA499BAF}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{693F60C6-0416-B5CF-C5C9-43E9DA499BAF}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
{693F60C6-0416-B5CF-C5C9-43E9DA499BAF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{693F60C6-0416-B5CF-C5C9-43E9DA499BAF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{693F60C6-0416-B5CF-C5C9-43E9DA499BAF}.Release|Any CPU.Build.0 = Release|Any CPU
|
{693F60C6-0416-B5CF-C5C9-43E9DA499BAF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{693F60C6-0416-B5CF-C5C9-43E9DA499BAF}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{693F60C6-0416-B5CF-C5C9-43E9DA499BAF}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{693F60C6-0416-B5CF-C5C9-43E9DA499BAF}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
{693F60C6-0416-B5CF-C5C9-43E9DA499BAF}.Release|x86.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|||||||
Reference in New Issue
Block a user