Help us understand the problem. What is going on with this article?

Travis CIでAPIをテストするときは

More than 1 year has passed since last update.

Travis CIでAPIをテストするときには、APIを使うテスト前に「APIが利用できるか」確認しましょう。

# Checks if API is available. This file is in the public domain.
import sys
import requests
api = requests.get("").status_code
if api>=400:
    print("API not available! Test failed.")
print("API confirmed.")
Logo is by me, CC BY-SA 2.0
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away