Created
January 31, 2016 13:24
-
-
Save Orbifold/e453940f8fb3562a0829 to your computer and use it in GitHub Desktop.
Question-answer from StackOveflow via the StacMan package
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
static void Main(string[] args) | |
{ | |
var client = new StacManClient(key: "Your-key", version: "2.1"); | |
var response = client.Search.GetMatchesAdvanced("stackoverflow", | |
page: 1, | |
pagesize: 10, | |
sort:SearchSort.Relevance, | |
accepted:true, | |
title:"whatever you like to search for", | |
order: Order.Desc, | |
filter: "!-*f(6rf)dKXe").Result; | |
for (int i = 0; i < response.Data.Items.Length; i++) | |
{ | |
var question = response.Data.Items[i]; | |
Console.WriteLine($"{i}: "+ question.Title); | |
Console.WriteLine(Environment.NewLine); | |
Console.WriteLine( question.Answers.SingleOrDefault(a=>a.IsAccepted).Body); | |
Console.WriteLine(Environment.NewLine); | |
} | |
Console.ReadKey(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment