例とまったく同じように、Javaプロジェクトからキーワードによる検索を実行しています-
https://developers.google.com/youtube/v3/code_samples/java#search_by_keyword
それはうまく機能しますが、例に PublishedAfter オプション search.setPublishedAfter(myDateTime);を追加すると、
エラー 400 メッセージを返します": "Bad Request"
YouTube.Search.List search = youtube.search().list("id,snippet");
String apiKey = properties.getProperty("youtube.apikey");
search.setKey(apiKey);
search.setQ(queryTerm);
search.setPublishedAfter(myDateTime) // the code works when removing this line
search.setFields("items(id/kind,id/videoId,snippet/title,snippet/thumbnails/default/url)");
search.setMaxResults(NUMBER_OF_VIDEOS_RETURNED);
SearchListResponse searchResponse = search.execute();
List<SearchResult> searchResultList = searchResponse.getItems();
setPublishedAfter オプションを使用したい
助けてくださいありがとう