Pro Reports for Wild Apricot is a Google Data Studio connector that helps Wild Apricot administrators understand your organization’s membership engagement, renewal rates, and demographics. Trend your revenue and get expense analyses. Whatever your question, enjoy all the organized data you need at your fingertips to make the business decisions want.
In order for Wild Apricot's infrastructure team to know when our connector is using their resources they asked us to integrate a custom User-Agent into our fetchAPI call. I suggest adding a header called User-Agent with the value WARM / 2.1 (DEV) Wild Apricot Reports Manager to be sent for all our API calls to Wild Apricot
function fetchAPI(url, token) {
// HTTP request
try {
var responseJSON = UrlFetchApp.fetch(url, {
method: "GET",
headers: { Authorization: "Bearer " + token, "User-Agent": "WARM / 2.1 (DEV) Wild Apricot Reports Manager" },
accept: "application/json"
});
return JSON.parse(responseJSON);
} catch (e) {
DataStudioApp.createCommunityConnector()
.newUserError()
.setDebugText("DBG: Failed to fetch data from API: " + e)
.setText("Wild Apricot API returned an error: " + e)
.throwException();
}
}
In order for Wild Apricot's infrastructure team to know when our connector is using their resources they asked us to integrate a custom User-Agent into our fetchAPI call. I suggest adding a header called User-Agent with the value WARM / 2.1 (DEV) Wild Apricot Reports Manager to be sent for all our API calls to Wild Apricot