20231123 - troca de local do json
This commit is contained in:
parent
412b28eec3
commit
a614b5a7fc
@ -12,6 +12,8 @@ using System.Net.Quic;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Newtonsoft.Json;
|
||||
using Microsoft.Extensions.Configuration.UserSecrets;
|
||||
using static System.Net.Mime.MediaTypeNames;
|
||||
|
||||
class Program
|
||||
{
|
||||
@ -20,7 +22,10 @@ class Program
|
||||
ConfigurationBuilder configurationBuilder = new ConfigurationBuilder();
|
||||
IConfiguration configuration = configurationBuilder.AddUserSecrets<Program>().Build();
|
||||
|
||||
if (configuration is null){ Environment.Exit(1); }
|
||||
|
||||
Console.Clear();
|
||||
|
||||
// URL da API que você deseja chamar
|
||||
string ConnSourcePath = configuration.GetValue<string>("DB_PATH");
|
||||
string apiUrl = configuration.GetValue<string>("PIPEFY_API_URL");
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
{
|
||||
"MySecretValues": {
|
||||
"Username": "Abc",
|
||||
"Password": "Xyz"
|
||||
}
|
||||
"DB_PATH": "C:\\Users\\contratos\\Documents\\Giuliano\\Pipefy.accdb",
|
||||
"PIPEFY_API_TOKEN": "eyJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJQaXBlZnkiLCJpYXQiOjE2OTg4NTYyMjcsImp0aSI6IjM2N2Y4M2NhLWZjODYtNGRhOC04ODEyLTkzODRkZGZkODc0MiIsInN1YiI6MzAyNTM0MzY2LCJ1c2VyIjp7ImlkIjozMDI1MzQzNjYsImVtYWlsIjoiYmFjazVAZW5lcmdpYXNtYXJ0LmNvbS5iciIsImFwcGxpY2F0aW9uIjozMDAyODkyNDgsInNjb3BlcyI6W119LCJpbnRlcmZhY2VfdXVpZCI6bnVsbH0.o13j9c_y3G3HX35qhX4PmkkibGsmlHsk5dL_Bxsr1CKV5Jlgj218kJdEmriS7aHiw0-P7sfs-bu4YcElfuyiqg",
|
||||
"PIPEFY_API_URL": "https://api.pipefy.com/graphql",
|
||||
"PIPEFY_TABLE_ID": "22HiedTk",
|
||||
"PIPEFY_TABLE_ID_GESTORES": "nuyW2tji"
|
||||
}
|
||||
9
data.cs
9
data.cs
@ -59,4 +59,13 @@ namespace Pipefy
|
||||
public string ?gestores { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class AppSettings
|
||||
{
|
||||
public string DB_PATH { get; set; }
|
||||
public string PIPEFY_API_TOKEN { get; set; }
|
||||
public string PIPEFY_API_URL { get; set; }
|
||||
public string PIPEFY_TABLE_ID { get; set; }
|
||||
public string PIPEFY_TABLE_ID_GESTORES { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user