Skip to main content

Python client for NHK API

Project description

https://drone.io/github.com/drillbits/nhk-api/status.png

Python client for NHK API.

Requirements

  • Python 3.3

Installation

$ pip install nhk-api

Usage

from datetime import date
from nhk import ProgramGuide


client = ProgramGuide(api_key='YOUR_API_KEY')

# Get program list
# http://api-portal.nhk.or.jp/doc_list-v1_con
program_list = client.pg_list('130', 'g1', date.today())
# or
# program_list = client.pg_list('東京', 'NHK総合1', date.today())

# Get program list by genre
# http://api-portal.nhk.or.jp/doc_genre-v1_con
program_list_by_genre = client.pg_genre('130', 'g1', '0700', date.today())
# or
# program_list_by_genre = client.pg_genre('東京', 'NHK総合1', 'アニメ/特撮(国内アニメ)', date.today())

# Get program information
# http://api-portal.nhk.or.jp/doc_info-v1_con
program_info = client.pg_info('130', 'g1', '2014021499999')
# or
# program_info = client.pg_info('東京', 'NHK総合1', '2014021499999')

# Get information of program that is broadcasting now
# http://api-portal.nhk.or.jp/doc_now-v1_con
program_now = client.pg_now('130', 'g1')
# or
# program_now = client.pg_now('東京', 'NHK総合1')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nhk_api-0.0.2-py2.py3-none-any.whl (8.0 kB view details)

Uploaded Python 2Python 3

File details

Details for the file nhk_api-0.0.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for nhk_api-0.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 87e9f0ebfe53d52010d18d8d770ade6580170340a6dc2e2ff5206bffcf57ccd5
MD5 1fb3ae5e798aef3b02d153e385a84f2b
BLAKE2b-256 9be928761664aeb114797610a8f183b53941538e960765ec942e952ba79f7c20

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page