Created
May 10, 2020 02:30
-
-
Save sugimomoto/46e77954320d7cc78fe0456fc15edb63 to your computer and use it in GitHub Desktop.
BacklogAPIRequestSample.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Newtonsoft.Json; | |
using RestSharp; | |
using System; | |
namespace BacklogAPI | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Console.WriteLine("Hello World!"); | |
var client = new RestClient("https://XXXXX.backlog.com/api/v2/issues?apiKey=XXXXXX"); | |
client.Timeout = -1; | |
var request = new RestRequest(Method.GET); | |
IRestResponse response = client.Execute(request); | |
var issues = JsonConvert.DeserializeObject<Issue[]>(response.Content); | |
foreach (var issue in issues) | |
{ | |
Console.WriteLine(issue.summary); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment