Rename CollectorRequest->Collector and add extras to target

This commit is contained in:
2023-05-27 09:04:53 +07:00
parent 467d1c6edf
commit f41fabab3f
7 changed files with 64 additions and 47 deletions

View File

@@ -8,12 +8,18 @@ void main() async {
final sdk = VLogs.create(APP_ID, API_KEY);
var request = CollectorRequest.builder()
var request = Collector.builder()
.message("Hello World")
.source(CollectorSource.mobile.name)
.type(CollectorType.log.name)
.build();
// Run this to test non-blocking collect
sdk.collectAsync(request);
// Run this to test blocking collect
var response = await sdk.collect(request);
// Output the response
print("Response: ${response.toJson()}");
}