We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PythonでQiita APIを叩いて新規投稿するスクリプトの例 (最小構成的な)
Qiita API を利用して記事を投稿する - Qiita
import requests import os if __name__ == "__main__": item = { 'title': 'title', "coediting": False, 'tags': [ { "name": "Python", "versions": ["0.0.1"] } ], 'private': True, 'tweet': False, } item['body'] = 'ABC' url = 'https://qiita.com/api/v2/items' token = os.environ['TOKEN'] headers = { 'Authorization': 'Bearer {}'.format(token), 'Content-Type': 'application/json', } print(item) print(headers) res = requests.post(url, headers=headers, json=item) print(res.json())
TOKEN=XXXXXXXXXXXXXXXXXXXXX python qiita.py
The text was updated successfully, but these errors were encountered:
No branches or pull requests
PythonでQiita APIを叩いて新規投稿するスクリプトの例 (最小構成的な)
Ref
Qiita API を利用して記事を投稿する - Qiita
Script
Execute
TOKEN=XXXXXXXXXXXXXXXXXXXXX python qiita.py
結果
The text was updated successfully, but these errors were encountered: