Code Samples

General Questions

To try Query Builder retrieval using C#

if (session != null)
{
    callCommand = session.GetCallCommand(); // Obtain a CallCommand object for later use
    device = session.GetActiveDevice();
    deviceEvents = device as ICOMDeviceEvents_Event;
    if (deviceEvents != null)
    {
        deviceEvents.onMuteStateChanged += onMuteStateChanged;
    }
    deviceListener = device.DeviceListener; // Obtain a DeviceListener object for later use
}

To detect a errors using Javascript

(function ($) {
    Drupal.behaviors.apigee_responsive_analytics = {
        attach: function (context, settings) {
            var apps = Drupal.settings.apigee_responsive_analytics_data;
            $.each(apps, function(index, value) {
                var wrapper = Object.keys(value)[0];
                console.log(value[wrapper].analytics_data.series);
                $('#'+wrapper).highcharts({
                    title: {
                        text: value[wrapper].analytics_data.chart_name,
                        x: -20
                    },
                    xAxis: {
                        categories: value[wrapper].analytics_data.categories,
                        title: {
                            text: 'Time (UTC)',
                            margin: 0
                        }
                    },
                    yAxis: {
                        title: {
                            text: value[wrapper].analytics_data.chart_name_y
                        },
                        plotLines: [{
                            value: 0,
                            width: 1,
                            color: '#808080'
                        }],
                        min:  0
                    },
                    legend: {
                        layout: 'vertical',
                        align: 'right',
                        verticalAlign: 'top',
                        x: -10,
                        y: 100,
                        borderWidth: 0
                    },
                    series: value[wrapper].analytics_data.series,
                    credits: {
                        enabled: false
                    },
                    plotOptions: {
                        line: {
                            marker: {
                                enabled: false
                            }
                        }
                    }
                });
            });
        }
    };
})(jQuery);

Try the below Software Developement Kit for the Web based applications.

(function ($) {
    Drupal.behaviors.apigee_responsive_analytics = {
        attach: function (context, settings) {
            var apps = Drupal.settings.apigee_responsive_analytics_data;
            $.each(apps, function(index, value) {
                var wrapper = Object.keys(value)[0];
                console.log(value[wrapper].analytics_data.series);
                $('#'+wrapper).highcharts({
                    title: {
                        text: value[wrapper].analytics_data.chart_name,
                        x: -20
                    },
                    xAxis: {
                        categories: value[wrapper].analytics_data.categories,
                        title: {
                            text: 'Time (UTC)',
                            margin: 0
                        }
                    },
                    yAxis: {
                        title: {
                            text: value[wrapper].analytics_data.chart_name_y
                        },
                        plotLines: [{
                            value: 0,
                            width: 1,
                            color: '#808080'
                        }],
                        min:  0
                    },
                    legend: {
                        layout: 'vertical',
                        align: 'right',
                        verticalAlign: 'top',
                        x: -10,
                        y: 100,
                        borderWidth: 0
                    },
                    series: value[wrapper].analytics_data.series,
                    credits: {
                        enabled: false
                    },
                    plotOptions: {
                        line: {
                            marker: {
                                enabled: false
                            }
                        }
                    }
                });
            });
        }
    };
})(jQuery);

Use the below C# code to get the response from funds api.

var client = new RestClient("https://api.franklintempleton.com/v1/funds");
var request = new RestRequest(Method.GET);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("authorization", "Bearer /bCHRYzioswDu5AZBC138tlmo/BBiXtBD6Tiv8nDSmY="); //Replace with your actual Bearer token
IRestResponse response = client.Execute(request);

Try the below code sample to get the response from funds api

import requests

url = "https://api.franklintempleton.com/v1/funds"

headers = {
    'authorization': "Bearer /bCHRYzioswDu5AZBC138tlmo/BBiXtBD6Tiv8nDSmY=", //Replace with your actual Bearer token
    'cache-control': "no-cache",
    }

response = requests.request("GET", url, headers=headers)

print(response.text)