Skip to content

AYLIEN's officially supported Python client library for accessing News API

License

Notifications You must be signed in to change notification settings

nazifberat/aylien_newsapi_python

 
 

Repository files navigation

aylien_news_api

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 Python package is automatically generated by the OpenAPI Generator project:

  • API version: 3.0
  • Package version: 3.0.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://newsapi.aylien.com/

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

If the python package is hosted on Github, you can install directly from Github

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import aylien_news_api 

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import aylien_news_api

Getting Started

Please follow the installation procedure and then run the following:

from __future__ import print_function
import os
import aylien_news_api
from aylien_news_api.rest import ApiException
from pprint import pprint

configuration = aylien_news_api.Configuration()
configuration.api_key['X-AYLIEN-NewsAPI-Application-ID'] = os.environ.get('NEWSAPI_APP_ID')
configuration.api_key['X-AYLIEN-NewsAPI-Application-Key'] = os.environ.get('NEWSAPI_APP_KEY')

client = aylien_news_api.ApiClient(configuration)
api_instance = aylien_news_api.DefaultApi(client)

try:
    api_response = api_instance.list_stories(
        title='startup',
        published_at_start='NOW-7DAYS',
        published_at_end='NOW',
        not_language=['en']
    )
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->list_stories: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://api.aylien.com/news

Class Method HTTP request Description
DefaultApi list_autocompletes GET /autocompletes List autocompletes
DefaultApi list_clusters GET /clusters List Clusters
DefaultApi list_coverages GET /coverages List coverages
DefaultApi list_histograms GET /histograms List histograms
DefaultApi list_related_stories GET /related_stories List related stories
DefaultApi list_stories GET /stories List Stories
DefaultApi list_time_series GET /time_series List time series
DefaultApi list_trends GET /trends List trends

Documentation For Models

Documentation For Authorization

app_id

  • Type: API key
  • API key parameter name: X-AYLIEN-NewsAPI-Application-ID
  • Location: HTTP header

app_key

  • Type: API key
  • API key parameter name: X-AYLIEN-NewsAPI-Application-Key
  • Location: HTTP header

Author

support@aylien.com

About

AYLIEN's officially supported Python client library for accessing News API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 99.9%
  • Shell 0.1%