Skip to content

Instantly share code, notes, and snippets.

@lmatt-bit
Created November 14, 2015 09:15
Show Gist options
  • Select an option

  • Save lmatt-bit/d558e9b7c4be56d5d714 to your computer and use it in GitHub Desktop.

Select an option

Save lmatt-bit/d558e9b7c4be56d5d714 to your computer and use it in GitHub Desktop.
Use Type Provider to query Statck overflow api
open System
open FSharp.Data
type Questions = JsonProvider<"""https://api.stackexchange.com/2.2/questions?site=stackoverflow""">
let csQuestions = """https://api.stackexchange.com/2.2/questions?site=stackoverflow&tagged=C%23"""
let getResult =
Questions.Load(csQuestions).Items |> Seq.iter (fun x -> Console.WriteLine x.Title)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment