6 people like it.

OData Type Provider to StackOverflow

References and type definition to open StackOverflow API over OData

1: 
2: 
3: 
4: 
5: 
6: 
7: 
8: 
#r "System.Data.Services.Client"
#r "FSharp.Data.TypeProviders"

open Microsoft.FSharp.Data.TypeProviders

type stackOverflowData = 
    ODataService<"http://data.stackexchange.com/stackoverflow/atom">
let context = stackOverflowData.GetDataContext()
namespace Microsoft
namespace Microsoft.FSharp
namespace Microsoft.FSharp.Data
namespace Microsoft.FSharp.Data.TypeProviders
type stackOverflowData

Full name: Script.stackOverflowData
type ODataService

Full name: Microsoft.FSharp.Data.TypeProviders.ODataService


<summary>Provides the types to access an OData service</summary><param name="ServiceUri">The Uri for the OData service</param><param name='LocalSchemaFile'>The local .csdl file for the service schema</param><param name='ForceUpdate'>Require that a direct connection to the service be available at design-time and force the refresh of the local schema file (default: true)</param><param name='ResolutionFolder'>The folder used to resolve relative file paths at compile-time (default: folder containing the project or script)</param><param name='DataServiceCollection'>Generate collections derived from DataServiceCollection (default: false)</param>
val context : obj

Full name: Script.context
Next Version Raw view Test code New version

More information

Link:http://fssnip.net/f0
Posted:8 years ago
Author:Phillip Trelford
Tags: type providers , stackoverflow