The AYLIEN News API is the most powerful way of sourcing, searching and syndicating analyzed and enriched news content. It is accessed by sending HTTP requests to our server, which returns information to your client.
This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.
Install the following dependencies:
go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context
go get github.com/antihax/optional
Put the package under your project folder and add the following in import:
import "./newsapi"
All URIs are relative to https://api.aylien.com/news
Class | Method | HTTP request | Description |
---|---|---|---|
DefaultApi | AdvancedListStories | Post /stories | List Stories |
DefaultApi | ListAutocompletes | Get /autocompletes | List autocompletes |
DefaultApi | ListClusters | Get /clusters | List Clusters |
DefaultApi | ListHistograms | Get /histograms | List histograms |
DefaultApi | ListRelatedStoriesGet | Get /related_stories | |
DefaultApi | ListRelatedStoriesPost | Post /related_stories | |
DefaultApi | ListStories | Get /stories | List Stories |
DefaultApi | ListTimeSeries | Get /time_series | List time series |
DefaultApi | ListTrends | Get /trends | List trends |
Example
auth := context.WithValue(context.Background(), sw.ContextAPIKey, sw.APIKey{
Key: "APIKEY",
Prefix: "Bearer", // Omit if not necessary.
})
r, err := client.Service.Operation(auth, args)
Example
auth := context.WithValue(context.Background(), sw.ContextAPIKey, sw.APIKey{
Key: "APIKEY",
Prefix: "Bearer", // Omit if not necessary.
})
r, err := client.Service.Operation(auth, args)
support@aylien.com