0

大量のバッチ リクエストを作成していますが、成功したリクエストとエラーになったリクエストを追跡したいと考えています。Google Classroom API V1 であらゆる種類のさまざまなリクエストを使用しています。

content-ID を一意の値に設定し、コールバックで参照したいと考えています。特にC#では、どんな助けでも大歓迎です。

バッチ リクエストにコースの削除を追加するサンプルを次に示します。

requests[CurrentBatch].Queue<GoogleCourse>(serviceCredential.Service.Courses.Delete(course.Id), (content, error, i, message) =>
            {

                if (content != null)
                {
                    //add the classroom 
                    GoogleClassroom.DAL.Datamodule.SaveGoogleCourseIdByNameAndUser(content.Id, content.Name, content.OwnerId);
                    log.Write("Successfully Added\n");
                }
                if (error != null)
                {
                    log.Write("error:" + error.ToString() + "\n");
                }
                if (message != null)
                {
                    log.Write("message:" + message.Content.ReadAsStringAsync().Result.ToString() + "\n");
                }

            });
4

1 に答える 1