Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Google の Blogger API を使用して、ブログ エントリを自動的に投稿しています。制限は 50 ですが、制限を超えるとエラーがスローされます。
失敗する前にプロセスを停止できるように、使用状況を 50 から取得する方法はありますか?
1 つの方法は、変数を作成し、リクエストごとに単純にインクリメントすることです。コードは次のようになります。
if (numberOfSentRequests<=50) { sendBloggerRequest(); }
try/catch ブロックを使用することもできます。Blogger API にリクエスト数を追跡する機能があるとは思えません。