Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.IO;
- using BaseDataConect;
- using System.Net;
- using Newtonsoft.Json;
- using System.Net.Http;
- using Newtonsoft.Json.Linq;
- namespace DataEve
- {
- class Program
- {
- static string api = "https://esi.evetech.net/latest/markets/10000002/orders/?datasource=tranquility&order_type=all&page=10";
- async static Task Main(string[] args)
- {
- HttpClient httpClient = new HttpClient();
- string request = api;
- HttpResponseMessage response =
- (await httpClient.GetAsync(request)).EnsureSuccessStatusCode();
- string responseBody = await response.Content.ReadAsStringAsync();
- JToken jArray = JToken.Parse(responseBody);
- jArray.
- List<Orders> orders = jArray.ToObject<List<Orders>>();
- }
- static void TestJson()
- {
- }
- }
- public class Orders
- {
- public int duration { get => duration; set => duration = value; }
- public bool is_buy_order { get => is_buy_order; set => is_buy_order = value; }
- public string issued { get => issued; set => issued = value; }
- public int location_id { get => location_id; set => location_id = value; }
- public int min_volume { get => min_volume; set => min_volume = value; }
- public int order_id { get => order_id; set => order_id = value; }
- public float price { get => price; set => price = value; }
- public string range { get => range; set => range = value; }
- public int system_id { get => system_id; set => system_id = value; }
- public int type_id { get => type_id; set => type_id = value; }
- public int volume_remain { get => volume_remain; set => volume_remain = value; }
- public int volume_total { get => volume_total; set => volume_total = value; }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment