[REORG]
This commit is contained in:
parent
2eefc23128
commit
fa8e032d21
18 changed files with 102 additions and 80 deletions
|
|
@ -5,12 +5,14 @@ using Newtonsoft.Json.Linq;
|
|||
namespace Yavsc.Helpers
|
||||
{
|
||||
using Models.societe.com;
|
||||
using Yavsc.Server;
|
||||
|
||||
public static class ComapnyInfoHelpers {
|
||||
public static async Task<CompanyInfoMessage> CheckSiren(this HttpClient web,
|
||||
string siren, CompanyInfoSettings api)
|
||||
{
|
||||
using (var request = new HttpRequestMessage(HttpMethod.Get,
|
||||
string.Format(Constants.CompanyInfoUrl,siren,api.ApiKey))) {
|
||||
string.Format(ServerConstants.CompanyInfoUrl,siren,api.ApiKey))) {
|
||||
using (var response = await web.SendAsync(request)) {
|
||||
var payload = JObject.Parse(await response.Content.ReadAsStringAsync());
|
||||
return payload.ToObject<CompanyInfoMessage>();
|
||||
|
|
@ -18,4 +20,4 @@ namespace Yavsc.Helpers
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue